mirror of
https://github.com/stleary/JSON-java.git
synced 2025-08-02 19:15:27 -04: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:
parent
fe45fa9cfb
commit
4c8cac22a8
@ -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();
|
||||
|
Loading…
x
Reference in New Issue
Block a user