Author: jbellis Date: Wed Sep 22 02:59:14 2010 New Revision: 999731 URL: http://svn.apache.org/viewvc?rev=999731&view=rev Log: avoid potential NPE in DTPE
Modified: cassandra/branches/cassandra-0.6/src/java/org/apache/cassandra/concurrent/DebuggableThreadPoolExecutor.java Modified: cassandra/branches/cassandra-0.6/src/java/org/apache/cassandra/concurrent/DebuggableThreadPoolExecutor.java URL: http://svn.apache.org/viewvc/cassandra/branches/cassandra-0.6/src/java/org/apache/cassandra/concurrent/DebuggableThreadPoolExecutor.java?rev=999731&r1=999730&r2=999731&view=diff ============================================================================== --- cassandra/branches/cassandra-0.6/src/java/org/apache/cassandra/concurrent/DebuggableThreadPoolExecutor.java (original) +++ cassandra/branches/cassandra-0.6/src/java/org/apache/cassandra/concurrent/DebuggableThreadPoolExecutor.java Wed Sep 22 02:59:14 2010 @@ -91,7 +91,8 @@ public class DebuggableThreadPoolExecuto } catch (ExecutionException e) { - Thread.getDefaultUncaughtExceptionHandler().uncaughtException(Thread.currentThread(), e.getCause()); + if (Thread.getDefaultUncaughtExceptionHandler() != null) + Thread.getDefaultUncaughtExceptionHandler().uncaughtException(Thread.currentThread(), e.getCause()); } }