--- 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);