DATAES-224 retain newlines when reading mapping/setting files

Fixed test-settings yaml
This commit is contained in:
pkraeutli
2015-12-18 14:09:32 +01:00
committed by Mohsin Husen
parent 7dbab75cf5
commit 9c91723833
3 changed files with 29 additions and 1 deletions

View File

@@ -1164,8 +1164,9 @@ public class ElasticsearchTemplate implements ElasticsearchOperations, Applicati
bufferedReader = new BufferedReader(inputStreamReader);
String line;
String lineSeparator = System.getProperty("line.separator");
while ((line = bufferedReader.readLine()) != null) {
stringBuilder.append(line);
stringBuilder.append(line).append(lineSeparator);
}
} catch (Exception e) {
logger.debug(String.format("Failed to load file from url: %s: %s", url, e.getMessage()));