jdk/src/share/classes/sun/nio/ch/Util.java
changeset 787 637b139ce684
parent 51 6fe31bc95bbc
child 798 75b3a644ef91
equal deleted inserted replaced
785:36c29b2692f1 787:637b139ce684
   140         if (ref == null
   140         if (ref == null
   141             || ((selWrapper = ref.get()) == null)
   141             || ((selWrapper = ref.get()) == null)
   142             || ((sel = selWrapper.get()) == null)
   142             || ((sel = selWrapper.get()) == null)
   143             || (sel.provider() != sc.provider())) {
   143             || (sel.provider() != sc.provider())) {
   144             sel = sc.provider().openSelector();
   144             sel = sc.provider().openSelector();
   145             localSelector.set(new SoftReference<SelectorWrapper>(
   145             selWrapper = new SelectorWrapper(sel);
   146                                   new SelectorWrapper(sel)));
   146             localSelector.set(new SoftReference<SelectorWrapper>(selWrapper));
   147         } else {
   147         }
   148             localSelectorWrapper.set(selWrapper);
   148         localSelectorWrapper.set(selWrapper);
   149         }
       
   150         return sel;
   149         return sel;
   151     }
   150     }
   152 
   151 
   153     static void releaseTemporarySelector(Selector sel)
   152     static void releaseTemporarySelector(Selector sel)
   154         throws IOException
   153         throws IOException