[exo-jcr-commits] exo-jcr SVN: r4557 - jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core.

do-not-reply at jboss.org do-not-reply at jboss.org
Wed Jun 22 02:09:49 EDT 2011


Author: tolusha
Date: 2011-06-22 02:09:49 -0400 (Wed, 22 Jun 2011)
New Revision: 4557

Modified:
   jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/ItemImpl.java
Log:
EXOJCR-1057: check is node locking first to avoid putting into the cache null item

Modified: jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/ItemImpl.java
===================================================================
--- jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/ItemImpl.java	2011-06-21 13:51:52 UTC (rev 4556)
+++ jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/ItemImpl.java	2011-06-22 06:09:49 UTC (rev 4557)
@@ -427,7 +427,18 @@
       boolean multiValue, int expectedType) throws ValueFormatException, VersionException, LockException,
       ConstraintViolationException, RepositoryException
    {
+      // Check if checked-in (versionable)
+      if (!parentNode.checkedOut())
+      {
+         throw new VersionException("Node " + parentNode.getPath() + " or its nearest ancestor is checked-in");
+      }
 
+      // Check is locked
+      if (!parentNode.checkLocking())
+      {
+         throw new LockException("Node " + parentNode.getPath() + " is locked ");
+      }
+
       QPath qpath = QPath.makeChildPath(parentNode.getInternalPath(), propertyName);
 
       int state;
@@ -508,18 +519,6 @@
             + locationFactory.createJCRPath(qpath).getAsString(false));
       }
 
-      // Check if checked-in (versionable)
-      if (!parentNode.checkedOut())
-      {
-         throw new VersionException("Node " + parentNode.getPath() + " or its nearest ancestor is checked-in");
-      }
-
-      // Check is locked
-      if (!parentNode.checkLocking())
-      {
-         throw new LockException("Node " + parentNode.getPath() + " is locked ");
-      }
-
       List<ValueData> valueDataList = new ArrayList<ValueData>();
 
       // cast to required type if neccessary



More information about the exo-jcr-commits mailing list