You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by cz...@apache.org on 2012/03/26 17:16:53 UTC
svn commit: r1305390 -
/sling/trunk/bundles/jcr/classloader/src/main/java/org/apache/sling/jcr/classloader/internal/RepositoryClassLoader.java
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) ) {