Author: michiel
Date: 2010-01-27 00:21:23 +0100 (Wed, 27 Jan 2010)
New Revision: 40731

Modified:
   mmbase/trunk/core/src/main/java/org/mmbase/util/ResourceLoader.java
Log:


Modified: mmbase/trunk/core/src/main/java/org/mmbase/util/ResourceLoader.java
===================================================================
--- mmbase/trunk/core/src/main/java/org/mmbase/util/ResourceLoader.java 
2010-01-26 14:01:48 UTC (rev 40730)
+++ mmbase/trunk/core/src/main/java/org/mmbase/util/ResourceLoader.java 
2010-01-26 23:21:23 UTC (rev 40731)
@@ -79,8 +79,9 @@
   </li>
 </ol>
  * <p>
+1685
  *   Resources which do not reside in the MMBase configuration repository, can 
also be handled. Those can be resolved relatively to the web root, using 
{...@link #getWebRoot()}.
- * </p>
+12390 * </p>
  *
  * <p>Resources can  programmaticly created or changed by the use of {...@link 
#createResourceAsStream}, or something like {...@link #getWriter}.</p>
  *
@@ -306,11 +307,13 @@
                             if (line == null) break;
                             if (line.startsWith("#")) continue; // support for 
comments
                             line = line.trim();
-                            String[] parts = line.split(":");
+                            String[] parts = line.split(":", 2);
                             String className;
                             if (parts.length == 2) {
                                 className = parts[1];
-                                weight = Integer.parseInt(parts[0]);
+                                if (parts[0].length() > 0) {
+                                    weight = Integer.parseInt(parts[0]);
+                                }
                             } else {
                                 className = parts[0];
                             }

_______________________________________________
Cvs mailing list
[email protected]
http://lists.mmbase.org/mailman/listinfo/cvs

Reply via email to