diff options
Diffstat (limited to 'sonar-application')
-rw-r--r-- | sonar-application/src/main/java/org/sonar/application/PropsBuilder.java | 4 | ||||
-rw-r--r-- | sonar-application/src/test/java/org/sonar/application/PropsBuilderTest.java | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/sonar-application/src/main/java/org/sonar/application/PropsBuilder.java b/sonar-application/src/main/java/org/sonar/application/PropsBuilder.java index 167b8a3e0c7..c6c3404d0b3 100644 --- a/sonar-application/src/main/java/org/sonar/application/PropsBuilder.java +++ b/sonar-application/src/main/java/org/sonar/application/PropsBuilder.java @@ -19,7 +19,6 @@ */ package org.sonar.application; -import org.apache.commons.io.Charsets; import org.apache.commons.io.FileUtils; import org.apache.commons.io.IOUtils; import org.sonar.process.ConfigurationUtils; @@ -32,6 +31,7 @@ import java.io.IOException; import java.io.InputStreamReader; import java.io.Reader; import java.net.URISyntaxException; +import java.nio.charset.StandardCharsets; import java.util.Properties; class PropsBuilder { @@ -87,7 +87,7 @@ class PropsBuilder { Properties p = new Properties(); File propsFile = new File(homeDir, "conf/sonar.properties"); if (propsFile.exists()) { - Reader reader = new InputStreamReader(new FileInputStream(propsFile), Charsets.UTF_8); + Reader reader = new InputStreamReader(new FileInputStream(propsFile), StandardCharsets.UTF_8); try { p.load(reader); } finally { diff --git a/sonar-application/src/test/java/org/sonar/application/PropsBuilderTest.java b/sonar-application/src/test/java/org/sonar/application/PropsBuilderTest.java index 9dd5c240dab..429a776ba3e 100644 --- a/sonar-application/src/test/java/org/sonar/application/PropsBuilderTest.java +++ b/sonar-application/src/test/java/org/sonar/application/PropsBuilderTest.java @@ -19,7 +19,6 @@ */ package org.sonar.application; -import org.apache.commons.io.Charsets; import org.apache.commons.io.FileUtils; import org.junit.Before; import org.junit.Rule; @@ -29,6 +28,7 @@ import org.sonar.process.Props; import java.io.File; import java.io.IOException; +import java.nio.charset.StandardCharsets; import java.util.Properties; import static org.assertj.core.api.Assertions.assertThat; @@ -122,7 +122,7 @@ public class PropsBuilderTest { @Test public void utf8_file_encoding() throws Exception { - FileUtils.write(new File(homeDir, "conf/sonar.properties"), "utf8prop=Thônes", Charsets.UTF_8); + FileUtils.write(new File(homeDir, "conf/sonar.properties"), "utf8prop=Thônes", StandardCharsets.UTF_8); Props props = new PropsBuilder(new Properties(), jdbcSettings, homeDir).build(); assertThat(props.value("utf8prop")).isEqualTo("Thônes"); } |