You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@avalon.apache.org by bu...@apache.org on 2001/11/08 15:01:19 UTC

DO NOT REPLY [Bug 4741] New: - NullPointerException in ThreadSafeComponentHandler

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=4741>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=4741

NullPointerException in ThreadSafeComponentHandler

           Summary: NullPointerException in ThreadSafeComponentHandler
           Product: Avalon
           Version: unspecified
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: Critical
          Priority: Other
         Component: Excalibur
        AssignedTo: avalon-dev@jakarta.apache.org
        ReportedBy: leo.sutic@inspireinfrastructure.com


When a ThreadSafeComponentHandler has been created via the 
ThreadSafeComponentHandler( final Component component ) constructor the 
m_factory member is set to null. However, in setLogger(Logger log) this is not 
checked for, and this results in a NullPointerException.

This patch fixes the problem:

cvs server: Diffing .
cvs server: Diffing lib
cvs server: Diffing src
cvs server: Diffing src/java
cvs server: Diffing src/java/org
cvs server: Diffing src/java/org/apache
cvs server: Diffing src/java/org/apache/avalon
cvs server: Diffing src/java/org/apache/avalon/excalibur
cvs server: Diffing src/java/org/apache/avalon/excalibur/cli
cvs server: Diffing src/java/org/apache/avalon/excalibur/collections
cvs server: Diffing src/java/org/apache/avalon/excalibur/component
Index: 
src/java/org/apache/avalon/excalibur/component/ThreadSafeComponentHandler.java
===================================================================
RCS file: /home/cvspublic/jakarta-avalon-
excalibur/src/java/org/apache/avalon/excalibur/component/ThreadSafeComponentHand
ler.java,v
retrieving revision 1.6
diff -u -r1.6 ThreadSafeComponentHandler.java
--- 
src/java/org/apache/avalon/excalibur/component/ThreadSafeComponentHandler.java
	2001/11/01 14:25:57	1.6
+++ 
src/java/org/apache/avalon/excalibur/component/ThreadSafeComponentHandler.java
	2001/11/07 20:43:31
@@ -60,7 +60,10 @@
 
     public void setLogger(Logger log)
     {
-        m_factory.setLogger(log);
+        if ( this.m_factory != null )
+        {
+            m_factory.setLogger(log);
+        }
 
         super.setLogger(log);
     }
cvs server: Diffing src/java/org/apache/avalon/excalibur/concurrent
cvs server: Diffing src/java/org/apache/avalon/excalibur/datasource
cvs server: Diffing src/java/org/apache/avalon/excalibur/i18n
cvs server: Diffing src/java/org/apache/avalon/excalibur/io
cvs server: Diffing src/java/org/apache/avalon/excalibur/logger
cvs server: Diffing src/java/org/apache/avalon/excalibur/logger/factory
cvs server: Diffing src/java/org/apache/avalon/excalibur/monitor
cvs server: Diffing src/java/org/apache/avalon/excalibur/naming
cvs server: Diffing src/java/org/apache/avalon/excalibur/naming/memory
cvs server: Diffing src/java/org/apache/avalon/excalibur/naming/rmi
cvs server: Diffing src/java/org/apache/avalon/excalibur/naming/rmi/server
cvs server: Diffing src/java/org/apache/avalon/excalibur/pool
cvs server: Diffing src/java/org/apache/avalon/excalibur/property
cvs server: Diffing src/java/org/apache/avalon/excalibur/proxy
cvs server: Diffing src/java/org/apache/avalon/excalibur/testcase
cvs server: Diffing src/java/org/apache/avalon/excalibur/xml
cvs server: Diffing src/java/org/apache/avalon/excalibur/xml/xpath
cvs server: Diffing src/scratchpad
cvs server: Diffing src/scratchpad/org
cvs server: Diffing src/scratchpad/org/apache
cvs server: Diffing src/scratchpad/org/apache/avalon
cvs server: Diffing src/scratchpad/org/apache/avalon/excalibur
cvs server: Diffing src/scratchpad/org/apache/avalon/excalibur/cache
cvs server: Diffing src/scratchpad/org/apache/avalon/excalibur/cache/doc-files
cvs server: Diffing src/scratchpad/org/apache/avalon/excalibur/cache/test
cvs server: Diffing src/scratchpad/org/apache/avalon/excalibur/catalog
cvs server: Diffing src/scratchpad/org/apache/avalon/excalibur/container
cvs server: Diffing src/scratchpad/org/apache/avalon/excalibur/extension
cvs server: Diffing src/scratchpad/org/apache/avalon/excalibur/extension/test
cvs server: Diffing src/scratchpad/org/apache/avalon/excalibur/i18n
cvs server: Diffing src/scratchpad/org/apache/avalon/excalibur/i18n/test
cvs server: Diffing src/scratchpad/org/apache/avalon/excalibur/i18n/util
cvs server: Diffing src/scratchpad/org/apache/avalon/excalibur/lang
cvs server: Diffing src/scratchpad/org/apache/avalon/excalibur/pipeline
cvs server: Diffing src/scratchpad/org/apache/avalon/excalibur/thread
cvs server: Diffing src/scratchpad/org/apache/avalon/excalibur/thread/impl
cvs server: Diffing src/scratchpad/org/apache/avalon/excalibur/util
cvs server: Diffing src/scratchpad/org/apache/avalon/excalibur/util/test
cvs server: Diffing src/scratchpad/org/apache/avalon/excalibur/vfs
cvs server: Diffing src/test
cvs server: Diffing src/test/org
cvs server: Diffing src/test/org/apache
cvs server: Diffing src/test/org/apache/avalon
cvs server: Diffing src/test/org/apache/avalon/excalibur
cvs server: Diffing src/test/org/apache/avalon/excalibur/cli
cvs server: Diffing src/test/org/apache/avalon/excalibur/cli/test
cvs server: Diffing src/test/org/apache/avalon/excalibur/collections
cvs server: Diffing src/test/org/apache/avalon/excalibur/collections/test
cvs server: Diffing src/test/org/apache/avalon/excalibur/concurrent
cvs server: Diffing src/test/org/apache/avalon/excalibur/concurrent/test
cvs server: Diffing src/test/org/apache/avalon/excalibur/datasource
cvs server: Diffing src/test/org/apache/avalon/excalibur/datasource/test
cvs server: Diffing src/test/org/apache/avalon/excalibur/i18n
cvs server: Diffing src/test/org/apache/avalon/excalibur/i18n/test
cvs server: Diffing src/test/org/apache/avalon/excalibur/io
cvs server: Diffing src/test/org/apache/avalon/excalibur/io/test
cvs server: Diffing src/test/org/apache/avalon/excalibur/logger
cvs server: Diffing src/test/org/apache/avalon/excalibur/logger/test
cvs server: Diffing src/test/org/apache/avalon/excalibur/monitor
cvs server: Diffing src/test/org/apache/avalon/excalibur/monitor/test
cvs server: Diffing src/test/org/apache/avalon/excalibur/naming
cvs server: Diffing src/test/org/apache/avalon/excalibur/naming/memory
cvs server: Diffing src/test/org/apache/avalon/excalibur/naming/memory/test
cvs server: Diffing src/test/org/apache/avalon/excalibur/naming/rmi
cvs server: Diffing src/test/org/apache/avalon/excalibur/naming/rmi/test
cvs server: Diffing src/test/org/apache/avalon/excalibur/naming/test
cvs server: Diffing src/test/org/apache/avalon/excalibur/pool
cvs server: Diffing src/test/org/apache/avalon/excalibur/pool/test
cvs server: Diffing src/test/org/apache/avalon/excalibur/property
cvs server: Diffing src/test/org/apache/avalon/excalibur/property/test
cvs server: Diffing src/test/org/apache/avalon/excalibur/test
cvs server: Diffing src/xdocs
cvs server: Diffing src/xdocs/dtd
cvs server: Diffing src/xdocs/images

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>