Author: cziegeler
Date: Fri Dec 28 04:01:10 2007
New Revision: 607218

URL: http://svn.apache.org/viewvc?rev=607218&view=rev
Log:
Prevent null pointer exception.

Modified:
    
incubator/sling/trunk/jcr/api/src/main/java/org/apache/sling/jcr/api/NodeTypeLoader.java

Modified: 
incubator/sling/trunk/jcr/api/src/main/java/org/apache/sling/jcr/api/NodeTypeLoader.java
URL: 
http://svn.apache.org/viewvc/incubator/sling/trunk/jcr/api/src/main/java/org/apache/sling/jcr/api/NodeTypeLoader.java?rev=607218&r1=607217&r2=607218&view=diff
==============================================================================
--- 
incubator/sling/trunk/jcr/api/src/main/java/org/apache/sling/jcr/api/NodeTypeLoader.java
 (original)
+++ 
incubator/sling/trunk/jcr/api/src/main/java/org/apache/sling/jcr/api/NodeTypeLoader.java
 Fri Dec 28 04:01:10 2007
@@ -131,7 +131,7 @@
                         // hacky wacky: interpret message to check whether it 
is for
                         // duplicate node type -> very bad, that this is the 
only
                         // way to check !!!
-                        if (t.getCause().getMessage().indexOf("already 
exists") >= 0) {
+                        if (t.getCause() != null && 
t.getCause().getMessage().indexOf("already exists") >= 0) {
                             // alright, node types are already registered, 
ignore
                             // this
                             log.debug("Node types already registered...");


Reply via email to