You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@avalon.apache.org by do...@apache.org on 2002/05/09 12:51:41 UTC
cvs commit: jakarta-avalon-excalibur/thread/src/java/org/apache/avalon/excalibur/thread/impl DefaultThreadPool.java
donaldp 02/05/09 03:51:41
Modified: thread/src/java/org/apache/avalon/excalibur/thread/impl
DefaultThreadPool.java
Log:
Don't Null pointer if context is null
Revision Changes Path
1.4 +8 -1 jakarta-avalon-excalibur/thread/src/java/org/apache/avalon/excalibur/thread/impl/DefaultThreadPool.java
Index: DefaultThreadPool.java
===================================================================
RCS file: /home/cvs/jakarta-avalon-excalibur/thread/src/java/org/apache/avalon/excalibur/thread/impl/DefaultThreadPool.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- DefaultThreadPool.java 1 May 2002 09:11:47 -0000 1.3
+++ DefaultThreadPool.java 9 May 2002 10:51:41 -0000 1.4
@@ -78,8 +78,15 @@
public Object newInstance()
{
final String name = getName() + " Worker #" + m_level++;
+
+ ThreadContext context = null;
+ if( null != m_context )
+ {
+ context = m_context.duplicate();
+ }
+
final WorkerThread worker =
- new WorkerThread( this, name, m_pool, m_context.duplicate() );
+ new WorkerThread( this, name, m_pool, context );
worker.setDaemon( true );
worker.enableLogging( m_logger );
worker.start();
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>