mirror of
https://github.com/fankes/JSON-java-compat.git
synced 2025-09-06 18:55:30 +08:00
Use System.lineSeparator()
Use the built-in System.lineSeparator() instead of implementing it ourselves with System.getProperty("line.separator") in order to clean up the code and make it easier to maintain.
This commit is contained in:
@@ -1239,8 +1239,8 @@ public class XMLTest {
|
||||
for (int numRead; (numRead = in.read(buffer, 0, buffer.length)) > 0; ) {
|
||||
expected.append(buffer, 0, numRead);
|
||||
}
|
||||
assertEquals(expected.toString().replaceAll("\\n|\\r\\n", System.getProperty("line.separator")),
|
||||
actualString.replaceAll("\\n|\\r\\n", System.getProperty("line.separator")));
|
||||
assertEquals(expected.toString().replaceAll("\\n|\\r\\n", System.lineSeparator()),
|
||||
actualString.replaceAll("\\n|\\r\\n", System.lineSeparator()));
|
||||
} finally {
|
||||
if (xmlStream != null) {
|
||||
xmlStream.close();
|
||||
|
Reference in New Issue
Block a user