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

Modified Files:
      Tag: MMBase-1_8
        ResourceLoader.java 
Log Message:
ported stuff with ! in resourceloader.xml to recognize the current jar from head


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.39.2.14
retrieving revision 1.39.2.15
diff -u -b -r1.39.2.14 -r1.39.2.15
--- ResourceLoader.java 14 Nov 2008 10:14:39 -0000      1.39.2.14
+++ ResourceLoader.java 8 Dec 2008 12:59:12 -0000       1.39.2.15
@@ -98,7 +98,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.39.2.14 2008/11/14 10:14:39 michiel 
Exp $
+ * @version $Id: ResourceLoader.java,v 1.39.2.15 2008/12/08 12:59:12 michiel 
Exp $
  */
 public class ResourceLoader extends ClassLoader {
 
@@ -1681,7 +1681,19 @@
                 ResourceLoader.readClassWeights();
             }
         }
-        ).getMaps();
+            ) {
+            protected Map.Entry getEntry(org.mmbase.util.xml.DocumentReader 
reader, String key, String value) {
+                String u = reader.getDocument().getDocumentURI();
+                String[] parts = u.split("!", 2);
+                log.info(u + "-> " + Arrays.asList(parts));
+                if (parts.length == 2) {
+                    if (key.startsWith("!")) {
+                        key = "\\A" + 
ReplacingLocalizedString.makeLiteral(parts[0]) + key + "\\z"; // should escape 
'.' and so one.
+                    }
+                }
+                return new Entry(key, value);
+            }
+        }.getMaps();
 
     private static final Map classWeights = new ConcurrentHashMap();
 
_______________________________________________
Cvs mailing list
Cvs@lists.mmbase.org
http://lists.mmbase.org/mailman/listinfo/cvs

Reply via email to