Skip to content

Commit

Permalink
Merge pull request #1374 from kluever/patch-1
Browse files Browse the repository at this point in the history
Migrate from `Charsets` to `StandardCharsets`.
  • Loading branch information
tdrwenski authored Aug 12, 2024
2 parents 80888f3 + 9b45aa8 commit 43df6f1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions cdm/core/src/test/java/ucar/nc2/TestNcDump.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
*/
package ucar.nc2;

import com.google.common.base.Charsets;
import com.google.common.io.Files;
import org.junit.Assert;
import org.junit.Test;
Expand All @@ -15,6 +14,7 @@
import java.io.IOException;
import java.io.StringWriter;
import java.lang.invoke.MethodHandles;
import java.nio.charset.StandardCharsets;

/** Test NcdumpW. */
public class TestNcDump {
Expand All @@ -30,7 +30,7 @@ public void testUnsignedFillValue() throws IOException {
null);

File expectedOutputFile = new File(TestDir.cdmLocalTestDataDir, "testUnsignedFillValue.dump");
String expectedOutput = Files.toString(expectedOutputFile, Charsets.UTF_8);
String expectedOutput = Files.toString(expectedOutputFile, StandardCharsets.UTF_8);

Assert.assertEquals(toUnixEOLs(expectedOutput), toUnixEOLs(sw.toString()));
}
Expand All @@ -43,7 +43,7 @@ public void testNestedGroups() throws IOException {
NCdumpW.print(TestDir.cdmLocalTestDataDir + "testNestedGroups.ncml", sw, true, true, false, false, null, null);

File expectedOutputFile = new File(TestDir.cdmLocalTestDataDir, "testNestedGroups.dump");
String expectedOutput = Files.toString(expectedOutputFile, Charsets.UTF_8);
String expectedOutput = Files.toString(expectedOutputFile, StandardCharsets.UTF_8);

Assert.assertEquals(toUnixEOLs(expectedOutput), toUnixEOLs(sw.toString()));
}
Expand Down
6 changes: 3 additions & 3 deletions cdm/core/src/test/java/ucar/nc2/write/TestNcdump.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
*/
package ucar.nc2.write;

import com.google.common.base.Charsets;
import com.google.common.io.Files;
import java.io.File;
import java.io.IOException;
import java.lang.invoke.MethodHandles;
import java.nio.charset.StandardCharsets;
import org.junit.Assert;
import org.junit.Test;
import org.slf4j.Logger;
Expand All @@ -32,7 +32,7 @@ public void testUnsignedFillValue() throws IOException {
String ncdumpOut = ncdump.print();

File expectedOutputFile = new File(TestDir.cdmLocalTestDataDir, "testUnsignedFillValueNew.dump");
String expectedOutput = Files.toString(expectedOutputFile, Charsets.UTF_8);
String expectedOutput = Files.toString(expectedOutputFile, StandardCharsets.UTF_8);

Assert.assertEquals(toUnixEOLs(expectedOutput), toUnixEOLs(ncdumpOut));
}
Expand All @@ -46,7 +46,7 @@ public void testNestedGroups() throws IOException {
String ncdumpOut = ncdump.print();

File expectedOutputFile = new File(TestDir.cdmLocalTestDataDir, "testNestedGroups.dump");
String expectedOutput = Files.toString(expectedOutputFile, Charsets.UTF_8);
String expectedOutput = Files.toString(expectedOutputFile, StandardCharsets.UTF_8);

Assert.assertEquals(toUnixEOLs(expectedOutput), toUnixEOLs(ncdumpOut));
}
Expand Down

0 comments on commit 43df6f1

Please sign in to comment.