jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ste...@apache.org
Subject svn commit: r178431 - in /incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core: NodeImpl.java SessionImpl.java
Date Wed, 25 May 2005 13:02:09 GMT
Author: stefan
Date: Wed May 25 06:02:08 2005
New Revision: 178431

URL: http://svn.apache.org/viewcvs?rev=178431&view=rev
Log:
- minor change in internal implementation of a 'rename only' move operation

Modified:
    incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/NodeImpl.java
    incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/SessionImpl.java

Modified: incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/NodeImpl.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/NodeImpl.java?rev=178431&r1=178430&r2=178431&view=diff
==============================================================================
--- incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/NodeImpl.java (original)
+++ incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/NodeImpl.java Wed May 25
06:02:08 2005
@@ -546,19 +546,14 @@
         return (NodeImpl) itemMgr.getItem(targetId);
     }
 
-    protected NodeImpl renameChildNodeLink(QName oldName, int index, String uuid, QName newName)
+    protected void renameChildNodeLink(QName oldName, int index, String uuid,
+                                       QName newName)
             throws RepositoryException {
         // modify the state of 'this', i.e. the parent node
         NodeState thisState = (NodeState) getOrCreateTransientItemState();
         thisState.removeChildNodeEntry(oldName, index);
         thisState.addChildNodeEntry(newName, uuid);
-
-        // create transient state of target, so that it gets modified.
-        NodeImpl target = (NodeImpl) itemMgr.getItem(new NodeId(uuid));
-        target.getOrCreateTransientItemState();
-        return target;
     }
-
 
     protected void removeChildProperty(String propName) throws RepositoryException {
         QName qName;

Modified: incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/SessionImpl.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/SessionImpl.java?rev=178431&r1=178430&r2=178431&view=diff
==============================================================================
--- incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/SessionImpl.java (original)
+++ incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/SessionImpl.java Wed May
25 06:02:08 2005
@@ -929,13 +929,8 @@
             srcParentNode.removeChildNode(srcName.getName(), index);
         }
 
-        // change definition of target if necessary
-        NodeDefinitionImpl oldTargetDef = (NodeDefinitionImpl) targetNode.getDefinition();
-        NodeDefId oldTargetDefId = oldTargetDef.unwrap().getId();
-        NodeDefId newTargetDefId = newTargetDef.unwrap().getId();
-        if (!oldTargetDefId.equals(newTargetDefId)) {
-            targetNode.onRedefine(newTargetDefId);
-        }
+        // change definition of target
+        targetNode.onRedefine(newTargetDef.unwrap().getId());
     }
 
     /**



Mime
View raw message