jackrabbit-oak-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Dürig <mdue...@apache.org>
Subject Re: svn commit: r1513387 - in /jackrabbit/oak/trunk/oak-jcr: ./ src/main/java/org/apache/jackrabbit/oak/jcr/ src/main/java/org/apache/jackrabbit/oak/jcr/delegate/ src/main/java/org/apache/jackrabbit/oak/jcr/version/
Date Tue, 13 Aug 2013 08:32:14 GMT

Hi,


On 13.8.13 10:19, mreutegg@apache.org wrote:
> @@ -1161,6 +1163,7 @@ public class NodeImpl<T extends NodeDele
>       @Nonnull
>       public Lock lock(final boolean isDeep, boolean isSessionScoped)
>               throws RepositoryException {
> +        checkLockable();
>           // TODO: use perform()
>           ContentSession session = sessionDelegate.getContentSession();
>           final String userID = session.getAuthInfo().getUserID();
> @@ -1195,6 +1198,7 @@ public class NodeImpl<T extends NodeDele
>        */
>       @Override
>       public void unlock() throws RepositoryException {
> +        checkLockable();
>           // TODO: use perform
>           String lockOwner = getOakPathOrThrow(JCR_LOCK_OWNER);
>           String lockIsDeep = getOakPathOrThrow(JCR_LOCK_IS_DEEP);
> @@ -1259,6 +1263,24 @@ public class NodeImpl<T extends NodeDele
>

Shouldn't these calls execute through SessionDelegate.perform() and the 
checkLockable() call go into SessionOperation#checkPreconditions? 
Otherwise we should probably add a comment why not.

Michael

Mime
View raw message