# HG changeset patch # User ksrini # Date 1382298857 25200 # Node ID 21e66f272f9890a7219273aba3cfd75eb85bacc7 # Parent f0aeb1da97bd6d93e3b43cc3a1f36ac4950c80a9 8026931: MethodParameters tests failing on Windows Reviewed-by: jjg, vromero diff -r f0aeb1da97bd -r 21e66f272f98 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 refFileList = Files.readAllLines(refFile.toPath(), StandardCharsets.UTF_8); - List sbList = Arrays.asList(sb.split(System.getProperty("line.separator"))); + List sbList = Arrays.asList(sb.split("[\r\n]+")); // Check if test output contains unexpected lines or is missing expected lines. - List sbOnly = new ArrayList(sbList); + List sbOnly = new ArrayList<>(sbList); sbOnly.removeAll(refFileList); for (String line: sbOnly) error("unexpected line found: " + line); - List refOnly = new ArrayList(refFileList); + List refOnly = new ArrayList<>(refFileList); refOnly.removeAll(sbList); for (String line: refOnly) error("expected line not found: " + line);