Update of /var/cvs/src/org/mmbase/util
In directory james.mmbase.org:/tmp/cvs-serv9122
Modified Files:
ResourceLoader.java
Log Message:
avoid NPE
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.76
retrieving revision 1.77
diff -u -b -r1.76 -r1.77
--- ResourceLoader.java 12 Nov 2008 13:32:51 -0000 1.76
+++ ResourceLoader.java 12 Nov 2008 15:11:40 -0000 1.77
@@ -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.76 2008/11/12 13:32:51 michiel Exp $
+ * @version $Id: ResourceLoader.java,v 1.77 2008/11/12 15:11:40 michiel Exp $
*/
public class ResourceLoader extends ClassLoader {
@@ -1731,9 +1731,12 @@
private static final Map<Pattern, Integer> classWeights = new
ConcurrentHashMap<Pattern, Integer>();
private static void getClassWeights() {
- for (Map.Entry<String, String> entry :
classWeightProperties.get("classloaderpattern")) {
+ Collection<Map.Entry<String, String>> col =
classWeightProperties.get("classloaderpattern");
+ if (col != null) {
+ for (Map.Entry<String, String> entry : col) {
classWeights.put(Pattern.compile(entry.getKey()),
Integer.parseInt(entry.getValue()));
}
+ }
log.info("Found classWeights " + classWeights);
}
_______________________________________________
Cvs mailing list
[email protected]
http://lists.mmbase.org/mailman/listinfo/cvs