8026931: MethodParameters tests failing on Windows
authorksrini
Sun, 20 Oct 2013 12:54:17 -0700
changeset 21482 21e66f272f98
parent 21481 f0aeb1da97bd
child 21483 bda04738a55a
8026931: MethodParameters tests failing on Windows Reviewed-by: jjg, vromero
langtools/test/tools/javac/MethodParameters/Tester.java
--- a/langtools/test/tools/javac/MethodParameters/Tester.java	Sun Oct 20 12:46:12 2013 -0700
+++ b/langtools/test/tools/javac/MethodParameters/Tester.java	Sun Oct 20 12:54:17 2013 -0700
@@ -27,7 +27,6 @@
 import java.nio.file.Files;
 import java.util.ArrayList;
 import java.util.Arrays;
-import java.util.Collections;
 import java.util.List;
 
 /**
@@ -152,14 +151,14 @@
             throws FileNotFoundException, IOException {
 
         List<String> refFileList = Files.readAllLines(refFile.toPath(), StandardCharsets.UTF_8);
-        List<String> sbList = Arrays.asList(sb.split(System.getProperty("line.separator")));
+        List<String> sbList = Arrays.asList(sb.split("[\r\n]+"));
         // Check if test output contains unexpected lines or is missing expected lines.
-        List<String> sbOnly = new ArrayList<String>(sbList);
+        List<String> sbOnly = new ArrayList<>(sbList);
         sbOnly.removeAll(refFileList);
         for (String line: sbOnly)
             error("unexpected line found: " + line);
 
-        List<String> refOnly = new ArrayList<String>(refFileList);
+        List<String> refOnly = new ArrayList<>(refFileList);
         refOnly.removeAll(sbList);
         for (String line: refOnly)
             error("expected line not found: " + line);