test/java/util/Collections/EmptyIterator.java

Print this page

        

@@ -51,14 +51,11 @@
 
         final Enumeration finalEmptyAbstract =
             Collections.emptyEnumeration();
         testEmptyEnumeration(finalEmptyAbstract);
 
-        @SuppressWarnings("unchecked") Iterator<?> x =
-            new sun.tools.java.MethodSet()
-            .lookupName(sun.tools.java.Identifier.lookup(""));
-        testEmptyIterator(x);
+        testEmptyIterator(Collections.<Object>emptyIterator());
     }
 
     <T> void testEmptyEnumeration(final Enumeration<T> e) {
         check(e == emptyEnumeration());
         check(! e.hasMoreElements());