jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ste...@apache.org
Subject svn commit: r111281 - /incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/ItemImpl.java
Date Wed, 08 Dec 2004 16:03:07 GMT
Author: stefan
Date: Wed Dec  8 08:02:58 2004
New Revision: 111281

URL: http://svn.apache.org/viewcvs?view=rev&rev=111281
Log:
cosmetics
Modified:
   incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/ItemImpl.java

Modified: incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/ItemImpl.java
Url: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/ItemImpl.java?view=diff&rev=111281&p1=incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/ItemImpl.java&r1=111280&p2=incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/ItemImpl.java&r2=111281
==============================================================================
--- incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/ItemImpl.java	(original)
+++ incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/ItemImpl.java	Wed Dec 
8 08:02:58 2004
@@ -1026,6 +1026,13 @@
         // check if protected
         if (isNode()) {
             NodeImpl node = (NodeImpl) this;
+            // check if this is the repository root node
+            if (node.isRepositoryRoot()) {
+                String msg = safeGetJCRPath() + ": cannot remove root node";
+                log.error(msg);
+                throw new RepositoryException(msg);
+            }
+
             NodeDef def = node.getDefinition();
             // check protected flag
             if (def.isProtected()) {

Mime
View raw message