Update of /var/cvs/src/org/mmbase/util
In directory james.mmbase.org:/tmp/cvs-serv6188

Modified Files:
        ResourceLoader.java 
Log Message:
made getResourceList('/<name>.') work better


See also: http://cvs.mmbase.org/viewcvs/src/org/mmbase/util


Index: ResourceLoader.java
===================================================================
RCS file: /var/cvs/src/org/mmbase/util/ResourceLoader.java,v
retrieving revision 1.69
retrieving revision 1.70
diff -u -b -r1.69 -r1.70
--- ResourceLoader.java 4 Sep 2008 05:56:23 -0000       1.69
+++ ResourceLoader.java 12 Sep 2008 14:39:29 -0000      1.70
@@ -97,7 +97,7 @@
  * <p>For property-files, the java-unicode-escaping is undone on loading, and 
applied on saving, so there is no need to think of that.</p>
  * @author Michiel Meeuwissen
  * @since  MMBase-1.8
- * @version $Id: ResourceLoader.java,v 1.69 2008/09/04 05:56:23 michiel Exp $
+ * @version $Id: ResourceLoader.java,v 1.70 2008/09/12 14:39:29 michiel Exp $
  */
 public class ResourceLoader extends ClassLoader {
 
@@ -1423,7 +1423,6 @@
 
                     
constraint.addChild(typeConstraint).addChild(nameConstraint);
 
-
                     query.setConstraint(constraint);
                     for (Node node :  resourceBuilder.getList(query)) {
                         String url = node.getStringValue(RESOURCENAME_FIELD);
@@ -1733,9 +1732,12 @@
             return res;
         }
 
-        Enumeration<URL> getResources(final String name) throws IOException {
+        Enumeration<URL> getResources(String name) throws IOException {
             try {
                 log.debug("Getting the resource " + name + " from " + this);
+                while (name.startsWith("/")) {
+                    name = name.substring(1);
+                }
                 return 
getClassLoader().getResources(getClassResourceName(name));
             } catch (IOException ioe) {
                 throw ioe;
_______________________________________________
Cvs mailing list
[email protected]
http://lists.mmbase.org/mailman/listinfo/cvs

Reply via email to