jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ang...@apache.org
Subject svn commit: r513275 - /jackrabbit/trunk/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/webdav/jcr/DefaultItemCollection.java
Date Thu, 01 Mar 2007 11:03:40 GMT
Author: angela
Date: Thu Mar  1 03:03:39 2007
New Revision: 513275

URL: http://svn.apache.org/viewvc?view=rev&rev=513275
Log:
-getLock for resouce locked by deep lock returns null instead of lock
-missing unescape of relpath for Node.orderBefore

Modified:
    jackrabbit/trunk/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/webdav/jcr/DefaultItemCollection.java

Modified: jackrabbit/trunk/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/webdav/jcr/DefaultItemCollection.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/webdav/jcr/DefaultItemCollection.java?view=diff&rev=513275&r1=513274&r2=513275
==============================================================================
--- jackrabbit/trunk/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/webdav/jcr/DefaultItemCollection.java
(original)
+++ jackrabbit/trunk/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/webdav/jcr/DefaultItemCollection.java
Thu Mar  1 03:03:39 2007
@@ -532,25 +532,23 @@
      */
     public ActiveLock getLock(Type type, Scope scope) {
         ActiveLock lock = null;
-        if (isLockable(type, scope)) {
-            if (Type.WRITE.equals(type)) {
-                try {
-                    if (!exists()) {
-                        log.warn("Unable to retrieve lock: no item found at '" + getResourcePath()
+ "'");
-                    } else if (((Node) item).isLocked()) {
-                        Lock jcrLock = ((Node) item).getLock();
-                        lock = new JcrActiveLock(jcrLock);
-                    }
-                } catch (AccessDeniedException e) {
-                    log.error("Error while accessing resource lock: "+e.getMessage());
-                } catch (UnsupportedRepositoryOperationException e) {
-                    log.error("Error while accessing resource lock: "+e.getMessage());
-                } catch (RepositoryException e) {
-                    log.error("Error while accessing resource lock: "+e.getMessage());
+        if (Type.WRITE.equals(type)) {
+            try {
+                if (!exists()) {
+                    log.warn("Unable to retrieve lock: no item found at '" + getResourcePath()
+ "'");
+                } else if (((Node) item).isLocked()) {
+                    Lock jcrLock = ((Node) item).getLock();
+                    lock = new JcrActiveLock(jcrLock);
                 }
-            } else {
-                lock = super.getLock(type, scope);
+            } catch (AccessDeniedException e) {
+                log.error("Error while accessing resource lock: "+e.getMessage());
+            } catch (UnsupportedRepositoryOperationException e) {
+                log.error("Error while accessing resource lock: "+e.getMessage());
+            } catch (RepositoryException e) {
+                log.error("Error while accessing resource lock: "+e.getMessage());
             }
+        } else {
+            lock = super.getLock(type, scope);
         }
         return lock;
     }
@@ -724,7 +722,7 @@
         Node n = (Node)item;
         try {
             for (int i = 0; i < instructions.length; i++) {
-                String srcRelPath = instructions[i].getMemberHandle();
+                String srcRelPath = Text.unescape(instructions[i].getMemberHandle());
                 Position pos = instructions[i].getPosition();
                 String destRelPath = getRelDestinationPath(pos, n.getNodes());
                 // preform the reordering
@@ -779,6 +777,9 @@
         } else {
             // before or last. in the latter case the segmet is 'null'
             destRelPath = position.getSegment();
+        }
+        if (destRelPath != null) {
+            destRelPath = Text.unescape(destRelPath);
         }
         return destRelPath;
     }



Mime
View raw message