Fix compatiblity with Microsoft Windows

Closes gh-879
This commit is contained in:
Stephane Nicoll
2019-05-28 14:30:51 +02:00
parent 62d0a94364
commit e6f287b298
6 changed files with 29 additions and 12 deletions

View File

@@ -243,8 +243,8 @@ public abstract class AbstractInitializrIntegrationTests {
protected JSONObject readJsonFrom(String path) {
try {
ClassPathResource resource = new ClassPathResource(path);
try (InputStream stream = resource.getInputStream()) {
String json = StreamUtils.copyToString(stream, Charset.forName("UTF-8"));
try (InputStream in = resource.getInputStream()) {
String json = StreamUtils.copyToString(in, Charset.forName("UTF-8"));
String placeholder = "";
if (this instanceof AbstractInitializrControllerIntegrationTests) {
placeholder = ((AbstractInitializrControllerIntegrationTests) this).host;