incubator-sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cziege...@apache.org
Subject svn commit: r794264 - /sling/trunk/bundles/commons/classloader/src/main/java/org/apache/sling/commons/classloader/impl/PackageAdminClassLoader.java
Date Wed, 15 Jul 2009 13:23:59 GMT
Author: cziegeler
Date: Wed Jul 15 13:23:59 2009
New Revision: 794264

URL: http://svn.apache.org/viewvc?rev=794264&view=rev
Log:
Fix AIOOB 

Modified:
    sling/trunk/bundles/commons/classloader/src/main/java/org/apache/sling/commons/classloader/impl/PackageAdminClassLoader.java

Modified: sling/trunk/bundles/commons/classloader/src/main/java/org/apache/sling/commons/classloader/impl/PackageAdminClassLoader.java
URL: http://svn.apache.org/viewvc/sling/trunk/bundles/commons/classloader/src/main/java/org/apache/sling/commons/classloader/impl/PackageAdminClassLoader.java?rev=794264&r1=794263&r2=794264&view=diff
==============================================================================
--- sling/trunk/bundles/commons/classloader/src/main/java/org/apache/sling/commons/classloader/impl/PackageAdminClassLoader.java
(original)
+++ sling/trunk/bundles/commons/classloader/src/main/java/org/apache/sling/commons/classloader/impl/PackageAdminClassLoader.java
Wed Jul 15 13:23:59 2009
@@ -45,7 +45,7 @@
 
     private String getPackageFromResource(final String resource) {
         final int lastSlash = resource.lastIndexOf('/');
-        final String pckName = resource.substring(0, lastSlash).replace('/', '.');
+        final String pckName = (lastSlash == -1 ? "" : resource.substring(0, lastSlash).replace('/',
'.'));
         return pckName;
     }
 



Mime
View raw message