Skip to content

Commit bfaad4d

Browse files
committed
Specify charset
1 parent 2ed6859 commit bfaad4d

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

http/jetty/src/test/java/org/apache/felix/http/jetty/it/MissingWebsocketDependenciesIT.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
*/
1717
package org.apache.felix.http.jetty.it;
1818

19+
import static java.nio.charset.StandardCharsets.ISO_8859_1;
1920
import static java.nio.charset.StandardCharsets.UTF_8;
2021
import static org.junit.Assert.assertTrue;
2122
import static org.ops4j.pax.exam.cm.ConfigurationAdminOptions.newConfiguration;
@@ -82,7 +83,7 @@ public void testMissingDepencencyWarningLogs() throws Exception {
8283
* @return true if the text was found, false otherwise
8384
*/
8485
private boolean containsString(Path file, String expected) throws IOException {
85-
String content = Files.readString(file, UTF_8);
86+
String content = Files.readString(file, ISO_8859_1);
8687
return content.toLowerCase().contains(expected.toLowerCase());
8788
}
8889

http/jetty12/src/test/java/org/apache/felix/http/jetty/it/MissingWebsocketDependenciesIT.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,14 @@
1616
*/
1717
package org.apache.felix.http.jetty.it;
1818

19+
import static java.nio.charset.StandardCharsets.ISO_8859_1;
1920
import static java.nio.charset.StandardCharsets.UTF_8;
2021
import static org.junit.Assert.assertTrue;
2122
import static org.ops4j.pax.exam.cm.ConfigurationAdminOptions.newConfiguration;
2223

2324
import java.io.File;
2425
import java.io.IOException;
26+
import java.nio.charset.StandardCharsets;
2527
import java.nio.file.Files;
2628
import java.nio.file.Path;
2729
import java.nio.file.Paths;
@@ -68,7 +70,7 @@ public void testMissingDepencencyWarningLogs() throws Exception {
6870
Awaitility.await("waitForLogs")
6971
.atMost(Duration.ofSeconds(50))
7072
.pollDelay(Duration.ofMillis(200))
71-
.until(() -> containsString(logFile, "Failed to initialize jetty EE10 specific websocket support")
73+
.until(() -> containsString(logFile, "Failed to initialize jetty EE10 specific websocket support")
7274
&& containsString(logFile, "Failed to initialize jakarta EE10 standard websocket support"));
7375
}
7476

@@ -80,7 +82,7 @@ public void testMissingDepencencyWarningLogs() throws Exception {
8082
* @return true if the text was found, false otherwise
8183
*/
8284
private boolean containsString(Path file, String expected) throws IOException {
83-
String content = Files.readString(file, UTF_8);
85+
String content = Files.readString(file, ISO_8859_1);
8486
return content.toLowerCase().contains(expected.toLowerCase());
8587
}
8688

0 commit comments

Comments
 (0)