Changeset 4013

Show
Ignore:
Timestamp:
05/11/08 15:11:25 (3 years ago)
Author:
michael
Message:

Fix resource name to work with Class Loader?.getResource() vs. Class.getResource().

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/src/main/java/org/sarugo/xtc/Resolver.java

    r3977 r4013  
    3131 
    3232        public URL getResource(String name) { 
     33                if (name.startsWith("/")) { 
     34                        name = name.substring(1); 
     35                } 
    3336                URL result = null; 
    3437                for (ClassLoader cl : getClassLoaders()) { 
     
    4346 
    4447        public InputStream getResourceAsStream(String name) { 
     48                if (name.startsWith("/")) { 
     49                        name = name.substring(1); 
     50                } 
    4551                InputStream result = null; 
    4652                for (ClassLoader cl : getClassLoaders()) {