diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index 74c342f..40da089 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -16,9 +16,9 @@ jobs: steps: - uses: actions/checkout@v2 - - name: Set up JDK 11 + - name: Set up JDK 8 uses: actions/setup-java@v1 with: - java-version: 11 + java-version: 8 - name: Build with Maven run: mvn -B package --file pom.xml diff --git a/pom.xml b/pom.xml index 394b5e6..84bde2f 100644 --- a/pom.xml +++ b/pom.xml @@ -48,8 +48,7 @@ - 11 - 11 + 8 UTF-8 diff --git a/src/test/java/org/greenbytes/http/sfv/SpecificationTests.java b/src/test/java/org/greenbytes/http/sfv/SpecificationTests.java index edd9e91..79a957b 100644 --- a/src/test/java/org/greenbytes/http/sfv/SpecificationTests.java +++ b/src/test/java/org/greenbytes/http/sfv/SpecificationTests.java @@ -5,6 +5,7 @@ import org.junit.runners.Parameterized; import java.io.IOException; +import java.nio.charset.StandardCharsets; import java.nio.file.Files; import java.nio.file.Path; import java.nio.file.Paths; @@ -68,7 +69,9 @@ public void runTest() { if (outputPath != null) { try { - Files.writeString(outputPath, testOutput, StandardOpenOption.APPEND, StandardOpenOption.CREATE); + Files.write(outputPath, + testOutput.toString().getBytes(StandardCharsets.UTF_8), + StandardOpenOption.APPEND, StandardOpenOption.CREATE); } catch (Exception ex) { System.err.printf("Can't write to %s%n.", outputPath); }