#BAEL-6916: add StandardCharsets
This commit is contained in:
parent
b5c06059f0
commit
083cf15f77
|
@ -19,6 +19,7 @@ import org.springframework.test.annotation.DirtiesContext;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.net.URISyntaxException;
|
import java.net.URISyntaxException;
|
||||||
import java.net.URL;
|
import java.net.URL;
|
||||||
|
import java.nio.charset.StandardCharsets;
|
||||||
import java.nio.file.Files;
|
import java.nio.file.Files;
|
||||||
import java.nio.file.Paths;
|
import java.nio.file.Paths;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
@ -77,7 +78,7 @@ public class FruitArrayJacksonUnmarshalUnitTest {
|
||||||
|
|
||||||
private String readJsonFromFile(String path) throws URISyntaxException, IOException {
|
private String readJsonFromFile(String path) throws URISyntaxException, IOException {
|
||||||
URL resource = FruitArrayJacksonUnmarshalUnitTest.class.getResource(path);
|
URL resource = FruitArrayJacksonUnmarshalUnitTest.class.getResource(path);
|
||||||
return new String(Files.readAllBytes(Paths.get(resource.toURI())));
|
return new String(Files.readAllBytes(Paths.get(resource.toURI())), StandardCharsets.UTF_8);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,6 +19,7 @@ import org.springframework.context.annotation.Bean;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.net.URISyntaxException;
|
import java.net.URISyntaxException;
|
||||||
import java.net.URL;
|
import java.net.URL;
|
||||||
|
import java.nio.charset.StandardCharsets;
|
||||||
import java.nio.file.Files;
|
import java.nio.file.Files;
|
||||||
import java.nio.file.Paths;
|
import java.nio.file.Paths;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
@ -76,7 +77,7 @@ public class FruitListJacksonUnmarshalUnitTest {
|
||||||
|
|
||||||
private String readJsonFromFile(String path) throws URISyntaxException, IOException {
|
private String readJsonFromFile(String path) throws URISyntaxException, IOException {
|
||||||
URL resource = FruitListJacksonUnmarshalUnitTest.class.getResource(path);
|
URL resource = FruitListJacksonUnmarshalUnitTest.class.getResource(path);
|
||||||
return new String(Files.readAllBytes(Paths.get(resource.toURI())));
|
return new String(Files.readAllBytes(Paths.get(resource.toURI())), StandardCharsets.UTF_8);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue