sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cziege...@apache.org
Subject svn commit: r1618948 - /sling/trunk/bundles/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/helper/jcr/JcrNodeResource.java
Date Tue, 19 Aug 2014 19:25:17 GMT
Author: cziegeler
Date: Tue Aug 19 19:25:17 2014
New Revision: 1618948

URL: http://svn.apache.org/r1618948
Log:
SLING-3848 : JcrNodeResource takes too long and initializes too much too soon. Remove unnecessary
Node.getPath

Modified:
    sling/trunk/bundles/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/helper/jcr/JcrNodeResource.java

Modified: sling/trunk/bundles/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/helper/jcr/JcrNodeResource.java
URL: http://svn.apache.org/viewvc/sling/trunk/bundles/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/helper/jcr/JcrNodeResource.java?rev=1618948&r1=1618947&r2=1618948&view=diff
==============================================================================
--- sling/trunk/bundles/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/helper/jcr/JcrNodeResource.java
(original)
+++ sling/trunk/bundles/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/helper/jcr/JcrNodeResource.java
Tue Aug 19 19:25:17 2014
@@ -136,7 +136,7 @@ class JcrNodeResource extends JcrItemRes
         } else if (type == PersistableValueMap.class ) {
             // check write
             try {
-                getNode().getSession().checkPermission(getNode().getPath(),
+                getNode().getSession().checkPermission(getPath(),
                     "set_property");
                 return (Type) new JcrModifiablePropertyMap(getNode(), this.dynamicClassLoader);
             } catch (AccessControlException ace) {
@@ -153,7 +153,7 @@ class JcrNodeResource extends JcrItemRes
         } else if (type == ModifiableValueMap.class ) {
             // check write
             try {
-                getNode().getSession().checkPermission(getNode().getPath(),
+                getNode().getSession().checkPermission(getPath(),
                     "set_property");
                 return (Type) new JcrModifiableValueMap(getNode(), this.dynamicClassLoader);
             } catch (AccessControlException ace) {
@@ -239,8 +239,8 @@ class JcrNodeResource extends JcrItemRes
 
     private URL getURL() {
         try {
-            return URLFactory.createURL(node.getSession(), node.getPath());
-        } catch (Exception ex) {
+            return URLFactory.createURL(node.getSession(), getPath());
+        } catch (final Exception ex) {
             LOGGER.error("getURL: Cannot create URL for " + this, ex);
         }
 
@@ -256,7 +256,7 @@ class JcrNodeResource extends JcrItemRes
                 return new JcrNodeResourceIterator(getResourceResolver(),
                     getNode().getNodes(), this.dynamicClassLoader);
             }
-        } catch (RepositoryException re) {
+        } catch (final RepositoryException re) {
             LOGGER.error("listChildren: Cannot get children of " + this, re);
         }
 



Mime
View raw message