Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate from Charsets to StandardCharsets. #1374

Merged
merged 1 commit into from
Aug 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading