diff options
author | Julien HENRY <julien.henry@sonarsource.com> | 2015-05-12 16:42:56 +0200 |
---|---|---|
committer | Julien HENRY <julien.henry@sonarsource.com> | 2015-05-12 16:43:36 +0200 |
commit | 3cc93206c68a2c8fd37dec04698724bf5f845331 (patch) | |
tree | 4f4f222abadd85ba5748238393ec7be81a23363a /sonar-plugin-api/src/test/java/org/sonar/api/resources/InputFileUtilsTest.java | |
parent | 52f34d90b5c307c1cb73cc75b9f6ff18f0568405 (diff) | |
download | sonarqube-3cc93206c68a2c8fd37dec04698724bf5f845331.tar.gz sonarqube-3cc93206c68a2c8fd37dec04698724bf5f845331.zip |
Use StandardCharsets instead of guava/commons-io
Diffstat (limited to 'sonar-plugin-api/src/test/java/org/sonar/api/resources/InputFileUtilsTest.java')
-rw-r--r-- | sonar-plugin-api/src/test/java/org/sonar/api/resources/InputFileUtilsTest.java | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/resources/InputFileUtilsTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/resources/InputFileUtilsTest.java index 630b9e6007c..13c9a18602e 100644 --- a/sonar-plugin-api/src/test/java/org/sonar/api/resources/InputFileUtilsTest.java +++ b/sonar-plugin-api/src/test/java/org/sonar/api/resources/InputFileUtilsTest.java @@ -19,22 +19,19 @@ */ package org.sonar.api.resources; -import com.google.common.io.Closeables; - -import org.junit.rules.ExpectedException; - -import org.junit.Rule; - -import com.google.common.base.Charsets; import com.google.common.io.ByteStreams; +import com.google.common.io.Closeables; import com.google.common.io.Files; +import org.junit.Rule; import org.junit.Test; +import org.junit.rules.ExpectedException; import java.io.BufferedInputStream; import java.io.File; import java.io.FileNotFoundException; import java.io.IOException; import java.io.InputStream; +import java.nio.charset.StandardCharsets; import java.util.Arrays; import java.util.List; @@ -168,12 +165,12 @@ public class InputFileUtilsTest { static void write(String content, File file) throws IOException { file.getParentFile().mkdirs(); - Files.write(content, file, Charsets.UTF_8); + Files.write(content, file, StandardCharsets.UTF_8); } static String read(InputStream input) throws IOException { try { - return new String(ByteStreams.toByteArray(input), Charsets.UTF_8.displayName()); + return new String(ByteStreams.toByteArray(input), StandardCharsets.UTF_8.displayName()); } finally { Closeables.closeQuietly(input); } |