jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Carsten Ziegeler (JIRA)" <j...@apache.org>
Subject [jira] Created: (JCR-1143) NullPointerException in ClassDescriptor
Date Tue, 25 Sep 2007 14:17:50 GMT
NullPointerException in ClassDescriptor
---------------------------------------

                 Key: JCR-1143
                 URL: https://issues.apache.org/jira/browse/JCR-1143
             Project: Jackrabbit
          Issue Type: Bug
          Components: jcr-mapping
            Reporter: Carsten Ziegeler


Index: /Users/cziegeler/Developer/workspaces/default/jackrabbit/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/main/java/org/apache/jackrabbit/ocm/mapper/model/ClassDescriptor.java
===================================================================
--- /Users/cziegeler/Developer/workspaces/default/jackrabbit/contrib/jackrabbit-jcr-mapping/jcr-mapping/src/main/java/org/apache/jackrabbit/ocm/mapper/model/ClassDescriptor.java
(revision 579109)
If a class descriptor (for whatever reason) does not have a jcr type, a npe is thrown in ClassDescriptor.
The following patch solves this issue:

+++ contrib/jackrabbit-jcr-mapping/jcr-mapping/src/main/java/org/apache/jackrabbit/ocm/mapper/model/ClassDescriptor.java
(working copy)
@@ -468,7 +468,7 @@
         while (iterator.hasNext()) {
             ClassDescriptor descendantClassDescriptor = (ClassDescriptor) iterator.next();
   
-            if (descendantClassDescriptor.getJcrType().equals(nodeType)) {
+            if (nodeType.equals(descendantClassDescriptor.getJcrType())) {
                 return descendantClassDescriptor;
             }
   


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message