diff --git a/spring-core/src/main/java/org/springframework/core/SortedProperties.java b/spring-core/src/main/java/org/springframework/core/SortedProperties.java index f1c2e8417b..1a979d39ed 100644 --- a/spring-core/src/main/java/org/springframework/core/SortedProperties.java +++ b/spring-core/src/main/java/org/springframework/core/SortedProperties.java @@ -49,7 +49,7 @@ import org.springframework.util.StringUtils; @SuppressWarnings("serial") class SortedProperties extends Properties { - static final String EOL = System.getProperty("line.separator"); + static final String EOL = System.lineSeparator(); private static final Comparator keyComparator = // (key1, key2) -> String.valueOf(key1).compareTo(String.valueOf(key2));