Skip to content

Commit

Permalink
Prefer JDK methods to Plexus (#80)
Browse files Browse the repository at this point in the history
  • Loading branch information
elharo authored Jan 3, 2025
1 parent 0a07753 commit a1f347e
Showing 1 changed file with 6 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -184,11 +184,9 @@ public void testVelocityUTF8() throws Exception {
file = new File(file, "UTF-8.bin");
assertTrue(file.exists());

try (InputStream in = Files.newInputStream(file.toPath())) {
byte[] data = IOUtil.toByteArray(in);
byte[] expected = "\u00E4\u00F6\u00FC\u00C4\u00D6\u00DC\u00DF".getBytes(StandardCharsets.UTF_8);
assertTrue(Arrays.equals(expected, data));
}
byte[] data = Files.readAllBytes(file.toPath());
byte[] expected = "\u00E4\u00F6\u00FC\u00C4\u00D6\u00DC\u00DF".getBytes(StandardCharsets.UTF_8);
assertTrue(Arrays.equals(expected, data));
}

public void testVelocityISO88591() throws Exception {
Expand All @@ -210,11 +208,9 @@ public void testVelocityISO88591() throws Exception {
file = new File(file, "ISO-8859-1.bin");
assertTrue(file.exists());

try (InputStream in = Files.newInputStream(file.toPath())) {
byte[] data = IOUtil.toByteArray(in);
byte[] expected = "\u00E4\u00F6\u00FC\u00C4\u00D6\u00DC\u00DF".getBytes(StandardCharsets.ISO_8859_1);
assertTrue(Arrays.equals(expected, data));
}
byte[] data = Files.readAllBytes(file.toPath());
byte[] expected = "\u00E4\u00F6\u00FC\u00C4\u00D6\u00DC\u00DF".getBytes(StandardCharsets.ISO_8859_1);
assertTrue(Arrays.equals(expected, data));
}

public void testFilteredBundles() throws Exception {
Expand Down

0 comments on commit a1f347e

Please sign in to comment.