Fix NPE when using Executor
authorfhanik <fhanik@13f79535-47bb-0310-9956-ffa450edef68>
Thu, 22 Mar 2007 16:54:26 +0000 (16:54 +0000)
committerfhanik <fhanik@13f79535-47bb-0310-9956-ffa450edef68>
Thu, 22 Mar 2007 16:54:26 +0000 (16:54 +0000)
git-svn-id: https://svn.apache.org/repos/asf/tomcat/tc6.0.x/trunk@521342 13f79535-47bb-0310-9956-ffa450edef68

java/org/apache/tomcat/util/net/JIoEndpoint.java

index 1e10d6c..7f2af0f 100644 (file)
@@ -261,7 +261,7 @@ public class JIoEndpoint {
     }
     
     public int getCurrentThreadsBusy() {
-        return curThreads - workers.size();
+        return workers!=null?curThreads - workers.size():0;
     }