jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ang...@apache.org
Subject svn commit: r588663 - /jackrabbit/sandbox/spi/spi2dav/src/main/java/org/apache/jackrabbit/spi2dav/RepositoryServiceImpl.java
Date Fri, 26 Oct 2007 14:33:16 GMT
Author: angela
Date: Fri Oct 26 07:33:16 2007
New Revision: 588663

URL: http://svn.apache.org/viewvc?rev=588663&view=rev
Log:
JCR-1159 SPI: improve description of locking methods on RepositoryService -> fix code in
spi2dav (return value of getLockInfo)

Modified:
    jackrabbit/sandbox/spi/spi2dav/src/main/java/org/apache/jackrabbit/spi2dav/RepositoryServiceImpl.java

Modified: jackrabbit/sandbox/spi/spi2dav/src/main/java/org/apache/jackrabbit/spi2dav/RepositoryServiceImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/spi/spi2dav/src/main/java/org/apache/jackrabbit/spi2dav/RepositoryServiceImpl.java?rev=588663&r1=588662&r2=588663&view=diff
==============================================================================
--- jackrabbit/sandbox/spi/spi2dav/src/main/java/org/apache/jackrabbit/spi2dav/RepositoryServiceImpl.java
(original)
+++ jackrabbit/sandbox/spi/spi2dav/src/main/java/org/apache/jackrabbit/spi2dav/RepositoryServiceImpl.java
Fri Oct 26 07:33:16 2007
@@ -1145,6 +1145,10 @@
         // lock holding node, we need to access the token via lockInfo
         // TODO: review this.
         LockInfo lInfo = getLockInfo(sessionInfo, nodeId);
+        if (lInfo == null) {
+            throw new LockException("No Lock present on Node with id " + nodeId);
+        }
+
         String lockToken = lInfo.getLockToken();
 
         // TODO: ev. additional check if lt is present on the sessionInfo?
@@ -1173,7 +1177,8 @@
             }
         }
         if (activeLock == null) {
-            throw new LockException("No lock present on node " + nodeId);
+            log.debug("No lock present on node " + nodeId);
+            return null;
         }
         if (activeLock.isDeep() && parentId != null) {
             // try if lock is inherited



Mime
View raw message