Skip to content

Commit 3c3a53b

Browse files
SONARJAVA-5682 Replace use of deprecated Charsets.UTF_8 constant (#5245)
1 parent db0a862 commit 3c3a53b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

sonar-java-plugin/src/test/java/org/sonar/plugins/java/MetadataTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,12 @@
1616
*/
1717
package org.sonar.plugins.java;
1818

19-
import com.google.common.base.Charsets;
2019
import com.google.common.io.Files;
2120
import com.google.gson.Gson;
2221
import com.google.gson.JsonElement;
2322
import com.google.gson.JsonObject;
2423
import java.io.FileNotFoundException;
24+
import java.nio.charset.StandardCharsets;
2525
import java.nio.file.Path;
2626
import java.util.Comparator;
2727
import java.util.List;
@@ -35,7 +35,7 @@ class MetadataTest {
3535
@Test
3636
void ensure_sane_Sonar_way_profile() throws FileNotFoundException {
3737
var profilePath = Path.of("src/main/resources/" + JavaSonarWayProfile.SONAR_WAY_PATH);
38-
var reader = Files.newReader(profilePath.toFile(), Charsets.UTF_8);
38+
var reader = Files.newReader(profilePath.toFile(), StandardCharsets.UTF_8);
3939

4040
Gson gson = new Gson();
4141
var json = gson.fromJson(reader, JsonObject.class);

0 commit comments

Comments
 (0)