jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ju...@apache.org
Subject svn commit: r770277 - /jackrabbit/trunk/jackrabbit-spi2jcr/src/main/java/org/apache/jackrabbit/spi2jcr/LockInfoImpl.java
Date Thu, 30 Apr 2009 15:12:02 GMT
Author: jukka
Date: Thu Apr 30 15:12:02 2009
New Revision: 770277

URL: http://svn.apache.org/viewvc?rev=770277&view=rev
Log:
JCR-1104: JSR 283 support

No more need to switch between JCR 1.0 and 2.0 implementations

Modified:
    jackrabbit/trunk/jackrabbit-spi2jcr/src/main/java/org/apache/jackrabbit/spi2jcr/LockInfoImpl.java

Modified: jackrabbit/trunk/jackrabbit-spi2jcr/src/main/java/org/apache/jackrabbit/spi2jcr/LockInfoImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-spi2jcr/src/main/java/org/apache/jackrabbit/spi2jcr/LockInfoImpl.java?rev=770277&r1=770276&r2=770277&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-spi2jcr/src/main/java/org/apache/jackrabbit/spi2jcr/LockInfoImpl.java
(original)
+++ jackrabbit/trunk/jackrabbit-spi2jcr/src/main/java/org/apache/jackrabbit/spi2jcr/LockInfoImpl.java
Thu Apr 30 15:12:02 2009
@@ -16,12 +16,12 @@
  */
 package org.apache.jackrabbit.spi2jcr;
 
-import org.apache.jackrabbit.spi.commons.conversion.NamePathResolver;
-import org.apache.jackrabbit.spi.LockInfo;
-
 import javax.jcr.RepositoryException;
 import javax.jcr.lock.Lock;
 
+import org.apache.jackrabbit.spi.LockInfo;
+import org.apache.jackrabbit.spi.commons.conversion.NamePathResolver;
+
 /**
  * <code>LockInfoImpl</code> implements a <code>LockInfo</code> on
top of a
  * JCR repository.
@@ -45,20 +45,6 @@
     }
 
     /**
-     * Creates a new lock info for the given JCR lock object.
-     * 
-     * @param lock the JCR lock.
-     * @param idFactory the id factory.
-     * @param resolver the name and path resolver.
-     * @throws RepositoryException If an error occurs while creating the info.
-     * @since JCR 2.0
-     */
-    private LockInfoImpl(javax.jcr.lock.Lock lock,
-                         IdFactoryImpl idFactory, NamePathResolver resolver) throws RepositoryException
{
-        super(lock.getLockToken(), lock.getLockOwner(), lock.isDeep(), lock.isSessionScoped(),
lock.getSecondsRemaining(), lock.isLockOwningSession(), idFactory.createNodeId(lock.getNode(),
resolver));
-    }
-
-    /**
      * Create a new <code>LockInfo</code> from the given parameters.
      * 
      * @param lock the JCR lock.
@@ -68,10 +54,6 @@
      * @throws RepositoryException If an error occurs while creating the info.
      */
     public static LockInfo createLockInfo(Lock lock, IdFactoryImpl idFactory, NamePathResolver
resolver) throws RepositoryException {
-        if (lock instanceof javax.jcr.lock.Lock) {
-            return new LockInfoImpl((javax.jcr.lock.Lock) lock, idFactory, resolver);
-        } else {
-            return new LockInfoImpl(lock, idFactory, resolver);
-        }
+        return new LockInfoImpl(lock, idFactory, resolver);
     }
 }
\ No newline at end of file



Mime
View raw message