incubator-sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cziege...@apache.org
Subject svn commit: r1304814 - /sling/trunk/bundles/jcr/classloader/src/main/java/org/apache/sling/jcr/classloader/internal/RepositoryClassLoader.java
Date Sat, 24 Mar 2012 14:49:54 GMT
Author: cziegeler
Date: Sat Mar 24 14:49:54 2012
New Revision: 1304814

URL: http://svn.apache.org/viewvc?rev=1304814&view=rev
Log:
SLING-2447 : ClassLoaderWriter should provide class loader for loading written classes/resources

Modified:
    sling/trunk/bundles/jcr/classloader/src/main/java/org/apache/sling/jcr/classloader/internal/RepositoryClassLoader.java

Modified: sling/trunk/bundles/jcr/classloader/src/main/java/org/apache/sling/jcr/classloader/internal/RepositoryClassLoader.java
URL: http://svn.apache.org/viewvc/sling/trunk/bundles/jcr/classloader/src/main/java/org/apache/sling/jcr/classloader/internal/RepositoryClassLoader.java?rev=1304814&r1=1304813&r2=1304814&view=diff
==============================================================================
--- sling/trunk/bundles/jcr/classloader/src/main/java/org/apache/sling/jcr/classloader/internal/RepositoryClassLoader.java
(original)
+++ sling/trunk/bundles/jcr/classloader/src/main/java/org/apache/sling/jcr/classloader/internal/RepositoryClassLoader.java
Sat Mar 24 14:49:54 2012
@@ -315,9 +315,6 @@ public final class RepositoryClassLoader
             if ( session.itemExists(path) ) {
                 final Node node = (Node)session.getItem(path);
                 logger.debug("Found resource at {}", path);
-                synchronized ( this.usedResources ) {
-                    this.usedResources.add(path);
-                }
                 res = node;
             } else {
                 logger.debug("No classpath entry contains {}", path);
@@ -325,6 +322,9 @@ public final class RepositoryClassLoader
         } catch (final RepositoryException re) {
             logger.debug("Error while trying to get node at " + path, re);
         }
+        synchronized ( this.usedResources ) {
+            this.usedResources.add(path);
+        }
         return res;
     }
 



Mime
View raw message