Author: markt
Date: Wed Jan 14 12:46:02 2009
New Revision: 734507

URL: http://svn.apache.org/viewvc?rev=734507&view=rev
Log:
Fix possible NPE reported by Eclipse

Modified:
    tomcat/trunk/java/org/apache/catalina/tribes/io/BufferPool.java

Modified: tomcat/trunk/java/org/apache/catalina/tribes/io/BufferPool.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/tribes/io/BufferPool.java?rev=734507&r1=734506&r2=734507&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/tribes/io/BufferPool.java (original)
+++ tomcat/trunk/java/org/apache/catalina/tribes/io/BufferPool.java Wed Jan 14 
12:46:02 2009
@@ -68,9 +68,11 @@
                        log.warn("Unable to initilize BufferPool, not pooling 
XByteBuffer objects:"+x.getMessage());
                        if ( log.isDebugEnabled() ) log.debug("Unable to 
initilize BufferPool, not pooling XByteBuffer objects:",x);
                    }
-                   pool.setMaxSize(DEFAULT_POOL_SIZE);
-                   log.info("Created a buffer pool with max 
size:"+DEFAULT_POOL_SIZE+" bytes of 
type:"+(clazz!=null?clazz.getName():"null"));
-                   instance = new BufferPool(pool);
+                   if (pool != null) {
+                       pool.setMaxSize(DEFAULT_POOL_SIZE);
+                       log.info("Created a buffer pool with max 
size:"+DEFAULT_POOL_SIZE+" bytes of 
type:"+(clazz!=null?clazz.getName():"null"));
+                       instance = new BufferPool(pool);
+                   }
                 }//end if
             }//sync
         }//end if



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to