< prev index next >

src/java.base/share/classes/sun/nio/ch/SelectorImpl.java

Print this page

        

@@ -50,12 +50,12 @@
     private Set<SelectionKey> publicKeys;             // Immutable
     private Set<SelectionKey> publicSelectedKeys;     // Removal allowed, but not addition
 
     protected SelectorImpl(SelectorProvider sp) {
         super(sp);
-        keys = new HashSet<SelectionKey>();
-        selectedKeys = new HashSet<SelectionKey>();
+        keys = new HashSet<>();
+        selectedKeys = new HashSet<>();
         if (Util.atBugLevel("1.4")) {
             publicKeys = keys;
             publicSelectedKeys = selectedKeys;
         } else {
             publicKeys = Collections.unmodifiableSet(keys);
< prev index next >