Update of /var/cvs/src/org/mmbase/util
In directory james.mmbase.org:/tmp/cvs-serv8216
Modified Files:
Tag: MMBase-1_8
ResourceLoader.java
Log Message:
protection agains a 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.39.2.10
retrieving revision 1.39.2.11
diff -u -b -r1.39.2.10 -r1.39.2.11
--- ResourceLoader.java 21 Jul 2008 13:31:40 -0000 1.39.2.10
+++ ResourceLoader.java 24 Jul 2008 18:38:49 -0000 1.39.2.11
@@ -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.39.2.10 2008/07/21 13:31:40 michiel
Exp $
+ * @version $Id: ResourceLoader.java,v 1.39.2.11 2008/07/24 18:38:49 michiel
Exp $
*/
public class ResourceLoader extends ClassLoader {
@@ -989,10 +989,11 @@
if (con instanceof FileConnection) {
FileConnection fc = (FileConnection) con;
File file = fc.getFile();
- if (file.equals(f)) {
+ if (file == null) log.warn("Null from " + cf + " " + con +
" " + f + " " + name);
+ if (file != null && file.equals(f)) {
return null; // ok, not shadowed.
} else {
- if (file.exists()) {
+ if (file != null && file.exists()) {
try {
return file.toURL(); // f is shadowed!
} catch (MalformedURLException mfue) {
_______________________________________________
Cvs mailing list
[email protected]
http://lists.mmbase.org/mailman/listinfo/cvs