diff --git a/jdk/test/java/nio/file/DirectoryStream/Basic.java b/jdk/test/java/nio/file/DirectoryStream/Basic.java index 69f5d18f656..ec9d68ffd17 100644 --- a/jdk/test/java/nio/file/DirectoryStream/Basic.java +++ b/jdk/test/java/nio/file/DirectoryStream/Basic.java @@ -69,7 +69,7 @@ public class Basic { throw new RuntimeException("entry not found"); // check filtering: f* should match foo - DirectoryStream.Filter filter = new DirectoryStream.Filter<>() { + DirectoryStream.Filter filter = new DirectoryStream.Filter() { private PathMatcher matcher = dir.getFileSystem().getPathMatcher("glob:f*"); public boolean accept(Path file) { diff --git a/jdk/test/java/util/PriorityQueue/NoNulls.java b/jdk/test/java/util/PriorityQueue/NoNulls.java index a56259a8ae0..21f76876b4c 100644 --- a/jdk/test/java/util/PriorityQueue/NoNulls.java +++ b/jdk/test/java/util/PriorityQueue/NoNulls.java @@ -53,7 +53,7 @@ import java.util.concurrent.PriorityBlockingQueue; public class NoNulls { void test(String[] args) throws Throwable { final Comparator nullTolerantComparator - = new Comparator<>() { + = new Comparator() { public int compare(String x, String y) { return (x == null ? -1 : y == null ? 1 : @@ -65,7 +65,7 @@ public class NoNulls { nullSortedSet.add(null); final PriorityQueue nullPriorityQueue - = new PriorityQueue<>() { + = new PriorityQueue() { public Object[] toArray() { return new Object[] { null };}}; final Collection nullCollection = new ArrayList<>();