jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ju...@apache.org
Subject svn commit: r776741 - in /jackrabbit/branches/1.x: ./ jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/server/io/DefaultHandler.java
Date Wed, 20 May 2009 15:44:45 GMT
Author: jukka
Date: Wed May 20 15:44:45 2009
New Revision: 776741

URL: http://svn.apache.org/viewvc?rev=776741&view=rev
Log:
1.x: Merged revision 776737 from (JCR-2070)

Modified:
    jackrabbit/branches/1.x/   (props changed)
    jackrabbit/branches/1.x/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/server/io/DefaultHandler.java

Propchange: jackrabbit/branches/1.x/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed May 20 15:44:45 2009
@@ -1 +1 @@
-/jackrabbit/trunk:770143-773197,773525-773554,773584,773588,773828,773835-775756,775836,775840,775981,775986,776036,776321-776322,776357,776650-776693
+/jackrabbit/trunk:770143-773197,773525-773554,773584,773588,773828,773835-775756,775836,775840,775981,775986,776036,776321-776322,776357,776650-776693,776737

Modified: jackrabbit/branches/1.x/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/server/io/DefaultHandler.java
URL: http://svn.apache.org/viewvc/jackrabbit/branches/1.x/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/server/io/DefaultHandler.java?rev=776741&r1=776740&r2=776741&view=diff
==============================================================================
--- jackrabbit/branches/1.x/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/server/io/DefaultHandler.java
(original)
+++ jackrabbit/branches/1.x/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/server/io/DefaultHandler.java
Wed May 20 15:44:45 2009
@@ -308,7 +308,15 @@
                 }
             }
             if (contentNode == null) {
-                contentNode = parentNode.addNode(JcrConstants.JCR_CONTENT, getContentNodeType());
+                // JCR-2070: Use the predefined content node type only
+                // when the underlying repository allows it to be used
+                if (parentNode.getPrimaryNodeType().canAddChildNode(
+                        JcrConstants.JCR_CONTENT, getContentNodeType())) {
+                    contentNode = parentNode.addNode(
+                            JcrConstants.JCR_CONTENT, getContentNodeType());
+                } else {
+                    contentNode = parentNode.addNode(JcrConstants.JCR_CONTENT);
+                }
             }
         }
         return contentNode;



Mime
View raw message