Explorar o código

ZOOKEEPER-611. hudson build failiure (mahadev)

git-svn-id: https://svn.apache.org/repos/asf/hadoop/zookeeper/trunk@888163 13f79535-47bb-0310-9956-ffa450edef68
Mahadev Konar %!s(int64=15) %!d(string=hai) anos
pai
achega
9722b84b52

+ 2 - 0
CHANGES.txt

@@ -151,6 +151,8 @@ BUGFIXES:
   ZOOKEEPER-597. ASyncHammerTest is failing intermittently on hudson trunk 
   (take 5) (mahadev)
 
+  ZOOKEEPER-611.  hudson build failiure (mahadev)
+
 IMPROVEMENTS:
   ZOOKEEPER-473. cleanup junit tests to eliminate false positives due to
   "socket reuse" and failure to close client (phunt via mahadev)

+ 2 - 6
src/java/main/org/apache/zookeeper/server/NIOServerCnxn.java

@@ -77,17 +77,13 @@ public class NIOServerCnxn implements Watcher, ServerCnxn {
                 LOG.error("Thread " + t + " died", e);
             }
         });
-        
         /**
          * this is to avoid the jvm bug:
          * NullPointerException in Selector.open()
          * http://bugs.sun.com/view_bug.do?bug_id=6427854
          */
-        try {
-        	Selector.open().close();
-        } catch(IOException ie) {
-        	LOG.error("Exception while opening a selector", ie);
-        }
+        System.setProperty("sun.nio.ch.bugLevel", 
+                System.getProperty("sun.nio.ch.bugLevel",""));
     }
 
     static public class Factory extends Thread {