Update of /var/cvs/src/org/mmbase/util In directory james.mmbase.org:/tmp/cvs-serv8098
Modified Files: ResourceLoader.java Log Message: solved failing test-case 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.71 retrieving revision 1.72 diff -u -b -r1.71 -r1.72 --- ResourceLoader.java 26 Sep 2008 08:42:40 -0000 1.71 +++ ResourceLoader.java 3 Oct 2008 11:09:29 -0000 1.72 @@ -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.71 2008/09/26 08:42:40 michiel Exp $ + * @version $Id: ResourceLoader.java,v 1.72 2008/10/03 11:09:29 michiel Exp $ */ public class ResourceLoader extends ClassLoader { @@ -1420,6 +1420,9 @@ } public URLConnection openConnection(String name) { URL u; + while (name.startsWith("/")) { + name = name.substring(1); + } try { u = new URL(NODE_URL_CONTEXT, name, this); } catch (MalformedURLException mfue) { @@ -1890,6 +1893,9 @@ public URLConnection openConnection(String name) { URL u; + while (name.startsWith("/")) { + name = name.substring(1); + } try { u = new URL(null, "http:/" + NOT_FOUND + name, this); } catch (MalformedURLException mfue) { @@ -1914,6 +1920,9 @@ private NotAvailableConnection(URL u, String n) { super(u); + while (n.startsWith("/")) { + n = n.substring(1); + } name = n; } public void connect() throws IOException { throw new IOException("No such resource " + name); }; _______________________________________________ Cvs mailing list Cvs@lists.mmbase.org http://lists.mmbase.org/mailman/listinfo/cvs