incubator-sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cziege...@apache.org
Subject svn commit: r1305390 - /sling/trunk/bundles/jcr/classloader/src/main/java/org/apache/sling/jcr/classloader/internal/RepositoryClassLoader.java
Date Mon, 26 Mar 2012 15:16:53 GMT
Author: cziegeler
Date: Mon Mar 26 15:16:53 2012
New Revision: 1305390

URL: http://svn.apache.org/viewvc?rev=1305390&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=1305390&r1=1305389&r2=1305390&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
Mon Mar 26 15:16:53 2012
@@ -195,7 +195,8 @@ public final class RepositoryClassLoader
 
         logger.debug("findResource: Try to find resource {}", name);
 
-        final Node res = findClassLoaderResource(name);
+        final String path = this.repositoryPath + '/' + name;
+        final Node res = findClassLoaderResource(path);
         if (res != null) {
             logger.debug("findResource: Getting resource from {}",
                 res);
@@ -263,7 +264,8 @@ public final class RepositoryClassLoader
         logger.debug("findClassPrivileged: Try to find path {class {}",
             name);
 
-        final Node res = this.findClassLoaderResource(name);
+        final String path = this.repositoryPath + '/' + name.replace('.', '/') + (".class");
+        final Node res = this.findClassLoaderResource(path);
         if (res != null) {
 
              // try defining the class, error aborts
@@ -308,8 +310,7 @@ public final class RepositoryClassLoader
      * @throws NullPointerException If this class loader has already been
      *      destroyed.
      */
-    private Node findClassLoaderResource(final String name) {
-        final String path = this.repositoryPath + '/' + name.replace('.', '/') + (".class");
+    private Node findClassLoaderResource(final String path) {
         Node res = null;
         try {
             if ( session.itemExists(path) ) {



Mime
View raw message