jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tri...@apache.org
Subject svn commit: r157729 - incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/nodetype/xml/NodeTypeFormat.java
Date Wed, 16 Mar 2005 09:53:50 GMT
Author: tripod
Date: Wed Mar 16 01:53:50 2005
New Revision: 157729

URL: http://svn.apache.org/viewcvs?view=rev&rev=157729
Log:
- fixing NPE in export of custom nodetypes

Modified:
    incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/nodetype/xml/NodeTypeFormat.java

Modified: incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/nodetype/xml/NodeTypeFormat.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/nodetype/xml/NodeTypeFormat.java?view=diff&r1=157728&r2=157729
==============================================================================
--- incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/nodetype/xml/NodeTypeFormat.java
(original)
+++ incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/nodetype/xml/NodeTypeFormat.java
Wed Mar 16 01:53:50 2005
@@ -243,8 +243,12 @@
      * Writes the primary item name of the node type definition.
      */
     private void writePrimaryItemName() {
-        String value = toJCRName(def.getPrimaryItemName());
-        setAttribute(PRIMARYITEMNAME_ATTRIBUTE, value);
+        QName name = def.getPrimaryItemName();
+        if (name == null) {
+            setAttribute(PRIMARYITEMNAME_ATTRIBUTE, "");
+        } else {
+            setAttribute(PRIMARYITEMNAME_ATTRIBUTE, toJCRName(name));
+        }
     }
 
     /**



Mime
View raw message