Commit d3c06ee0 authored by Phillip Webb's avatar Phillip Webb

Remove windows line endings when parsing index

parent 4b1346f4
...@@ -44,7 +44,8 @@ class IndexedLayers implements Layers { ...@@ -44,7 +44,8 @@ class IndexedLayers implements Layers {
private MultiValueMap<String, String> layers = new LinkedMultiValueMap<>(); private MultiValueMap<String, String> layers = new LinkedMultiValueMap<>();
IndexedLayers(String indexFile) { IndexedLayers(String indexFile) {
String[] lines = Arrays.stream(indexFile.split("\n")).filter(StringUtils::hasText).toArray(String[]::new); String[] lines = Arrays.stream(indexFile.split("\n")).map((line) -> line.replace("\r", ""))
.filter(StringUtils::hasText).toArray(String[]::new);
String layer = null; String layer = null;
for (String line : lines) { for (String line : lines) {
if (line.startsWith("- ")) { if (line.startsWith("- ")) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment