Skip to content

Commit 67cb10d

Browse files
committed
[ci] Use charset with filewriter
1 parent 9ea182f commit 67cb10d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/test/java/org/apache/ibatis/io/ExternalResourcesTest.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
import java.io.FileNotFoundException;
2222
import java.io.FileWriter;
2323
import java.io.IOException;
24+
import java.nio.charset.StandardCharsets;
2425

2526
import org.junit.jupiter.api.AfterEach;
2627
import org.junit.jupiter.api.BeforeEach;
@@ -82,7 +83,7 @@ void testcopyExternalResource_emptyStringAsFile() {
8283
void testGetConfiguredTemplate() {
8384
String templateName = "";
8485

85-
try (FileWriter fileWriter = new FileWriter(tempFile)) {
86+
try (FileWriter fileWriter = new FileWriter(tempFile, StandardCharsets.UTF_8)) {
8687
fileWriter.append("new_command.template=templates/col_new_template_migration.sql");
8788
fileWriter.flush();
8889
templateName = ExternalResources.getConfiguredTemplate(tempFile.getAbsolutePath(), "new_command.template");

0 commit comments

Comments
 (0)