geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ga...@apache.org
Subject svn commit: r1504952 - /geronimo/specs/trunk/geronimo-activation_1.1_spec/src/main/java/javax/activation/MimetypesFileTypeMap.java
Date Fri, 19 Jul 2013 18:09:24 GMT
Author: gawor
Date: Fri Jul 19 18:09:24 2013
New Revision: 1504952

URL: http://svn.apache.org/r1504952
Log:
GERONIMO-6484: NPE in MimetypesFileTypeMap 

Modified:
    geronimo/specs/trunk/geronimo-activation_1.1_spec/src/main/java/javax/activation/MimetypesFileTypeMap.java

Modified: geronimo/specs/trunk/geronimo-activation_1.1_spec/src/main/java/javax/activation/MimetypesFileTypeMap.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-activation_1.1_spec/src/main/java/javax/activation/MimetypesFileTypeMap.java?rev=1504952&r1=1504951&r2=1504952&view=diff
==============================================================================
--- geronimo/specs/trunk/geronimo-activation_1.1_spec/src/main/java/javax/activation/MimetypesFileTypeMap.java
(original)
+++ geronimo/specs/trunk/geronimo-activation_1.1_spec/src/main/java/javax/activation/MimetypesFileTypeMap.java
Fri Jul 19 18:09:24 2013
@@ -59,6 +59,9 @@ public class MimetypesFileTypeMap extend
         // defaults from resources called /META-INF/mime.types
         try {
             ClassLoader cl = MimetypesFileTypeMap.class.getClassLoader();
+            if (cl == null) {
+                cl = ClassLoader.getSystemClassLoader();
+            }
             Enumeration e = cl.getResources("/META-INF/mime.types");
             while (e.hasMoreElements()) {
                 URL url = (URL) e.nextElement();



Mime
View raw message