Skip to content

Commit 5aa0cdb

Browse files
thejeff77claude
andcommitted
fix: use StandardCharsets.UTF_8 to avoid forbidden API violation
The forbiddenapis plugin rejects String(byte[]) without explicit charset. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 04e1b13 commit 5aa0cdb

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

modules/openapi-generator/src/test/java/org/openapitools/codegen/kotlin/spring/KotlinSpringServerCodegenTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5133,7 +5133,7 @@ public void suspendFunctionsDefaultsToFalse() throws Exception {
51335133
);
51345134
// Verify no suspend keyword appears
51355135
Path petApiPath = root.resolve("src/main/kotlin/org/openapitools/api/PetApi.kt");
5136-
String content = new String(Files.readAllBytes(petApiPath));
5136+
String content = new String(Files.readAllBytes(petApiPath), java.nio.charset.StandardCharsets.UTF_8);
51375137
Assert.assertFalse(content.contains("suspend fun"),
51385138
"suspend should not be present when suspendFunctions is not enabled");
51395139
}

0 commit comments

Comments
 (0)