aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-testing-harness/src
diff options
context:
space:
mode:
Diffstat (limited to 'sonar-testing-harness/src')
-rw-r--r--sonar-testing-harness/src/main/java/org/sonar/test/JsonAssert.java4
-rw-r--r--sonar-testing-harness/src/main/java/org/sonar/test/i18n/BundleSynchronizedMatcher.java4
2 files changed, 4 insertions, 4 deletions
diff --git a/sonar-testing-harness/src/main/java/org/sonar/test/JsonAssert.java b/sonar-testing-harness/src/main/java/org/sonar/test/JsonAssert.java
index 2632d9e2504..9e6cc013149 100644
--- a/sonar-testing-harness/src/main/java/org/sonar/test/JsonAssert.java
+++ b/sonar-testing-harness/src/main/java/org/sonar/test/JsonAssert.java
@@ -22,12 +22,12 @@ package org.sonar.test;
import com.google.gson.GsonBuilder;
import com.google.gson.JsonElement;
import com.google.gson.JsonParser;
-import org.apache.commons.io.Charsets;
import org.apache.commons.io.IOUtils;
import org.junit.ComparisonFailure;
import java.io.IOException;
import java.net.URL;
+import java.nio.charset.StandardCharsets;
/**
* Assertion to compare JSON documents. Comparison is not strict:
@@ -100,7 +100,7 @@ public class JsonAssert {
private static String urlToString(URL url) {
try {
- return IOUtils.toString(url, Charsets.UTF_8);
+ return IOUtils.toString(url, StandardCharsets.UTF_8);
} catch (IOException e) {
throw new IllegalStateException("Fail to load JSON from " + url, e);
}
diff --git a/sonar-testing-harness/src/main/java/org/sonar/test/i18n/BundleSynchronizedMatcher.java b/sonar-testing-harness/src/main/java/org/sonar/test/i18n/BundleSynchronizedMatcher.java
index 00b333144ad..2eb2430efcd 100644
--- a/sonar-testing-harness/src/main/java/org/sonar/test/i18n/BundleSynchronizedMatcher.java
+++ b/sonar-testing-harness/src/main/java/org/sonar/test/i18n/BundleSynchronizedMatcher.java
@@ -19,7 +19,6 @@
*/
package org.sonar.test.i18n;
-import org.apache.commons.io.Charsets;
import org.apache.commons.io.IOUtils;
import org.hamcrest.BaseMatcher;
import org.hamcrest.Description;
@@ -30,6 +29,7 @@ import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStreamWriter;
import java.io.Writer;
+import java.nio.charset.StandardCharsets;
import java.util.Map;
import java.util.Properties;
import java.util.SortedMap;
@@ -121,7 +121,7 @@ public class BundleSynchronizedMatcher extends BaseMatcher<String> {
dumpFile.delete();
}
dumpFile.getParentFile().mkdirs();
- try (Writer writer = new OutputStreamWriter(new FileOutputStream(dumpFile), Charsets.UTF_8)) {
+ try (Writer writer = new OutputStreamWriter(new FileOutputStream(dumpFile), StandardCharsets.UTF_8)) {
writer.write(details);
} catch (IOException e) {
throw new IllegalStateException("Unable to write the report to 'target/l10n/" + bundleName + ".report.txt'", e);