Skip to content

Commit c91c88b

Browse files
committed
Fix forbidden API check: specify UTF-8 charset
The test was using String(byte[]) without specifying charset, which is flagged by forbiddenapis as using the default charset.
1 parent 6902ba0 commit c91c88b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

modules/openapi-generator/src/test/java/org/openapitools/codegen/java/jersey3/JavaJersey3ErrorEntityTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ private String readTemplate(String templateName) throws Exception {
142142
java.io.InputStream is = getClass().getClassLoader()
143143
.getResourceAsStream(JERSEY3_TEMPLATE_DIR + templateName);
144144
if (is != null) {
145-
return new String(is.readAllBytes());
145+
return new String(is.readAllBytes(), java.nio.charset.StandardCharsets.UTF_8);
146146
}
147147
} catch (Exception ignored) {}
148148

0 commit comments

Comments
 (0)