7025468: Tests using diamond with anonymous inner classes needs to be reverted
authoralanb
Tue, 08 Mar 2011 10:32:18 +0000
changeset 8580 d1585a92e376
parent 8578 f5d3509ad92b
child 8581 f22e1f4ade7c
child 8764 f34ee71fc38a
7025468: Tests using diamond with anonymous inner classes needs to be reverted Reviewed-by: dholmes, forax
jdk/test/java/nio/file/DirectoryStream/Basic.java
jdk/test/java/util/PriorityQueue/NoNulls.java
--- a/jdk/test/java/nio/file/DirectoryStream/Basic.java	Mon Mar 07 14:14:37 2011 -0800
+++ b/jdk/test/java/nio/file/DirectoryStream/Basic.java	Tue Mar 08 10:32:18 2011 +0000
@@ -69,7 +69,7 @@
             throw new RuntimeException("entry not found");
 
         // check filtering: f* should match foo
-        DirectoryStream.Filter<Path> filter = new DirectoryStream.Filter<>() {
+        DirectoryStream.Filter<Path> filter = new DirectoryStream.Filter<Path>() {
             private PathMatcher matcher =
                 dir.getFileSystem().getPathMatcher("glob:f*");
             public boolean accept(Path file) {
--- a/jdk/test/java/util/PriorityQueue/NoNulls.java	Mon Mar 07 14:14:37 2011 -0800
+++ b/jdk/test/java/util/PriorityQueue/NoNulls.java	Tue Mar 08 10:32:18 2011 +0000
@@ -53,7 +53,7 @@
 public class NoNulls {
     void test(String[] args) throws Throwable {
         final Comparator<String> nullTolerantComparator
-            = new Comparator<>() {
+            = new Comparator<String>() {
             public int compare(String x, String y) {
                 return (x == null ? -1 :
                         y == null ? 1 :
@@ -65,7 +65,7 @@
         nullSortedSet.add(null);
 
         final PriorityQueue<String> nullPriorityQueue
-            = new PriorityQueue<>() {
+            = new PriorityQueue<String>() {
             public Object[] toArray() { return new Object[] { null };}};
 
         final Collection<String> nullCollection = new ArrayList<>();