commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From skitch...@apache.org
Subject svn commit: r375866 - /jakarta/commons/proper/logging/trunk/src/java/org/apache/commons/logging/LogFactory.java
Date Wed, 08 Feb 2006 05:46:07 GMT
Author: skitching
Date: Tue Feb  7 21:46:03 2006
New Revision: 375866

URL: http://svn.apache.org/viewcvs?rev=375866&view=rev
Log:
Fix problem where getResources method causes NoSuchMethodError on 1.1 JVMs,
due to lack of ClassLoader.getResources method. See bugzilla #37484.

Modified:
    jakarta/commons/proper/logging/trunk/src/java/org/apache/commons/logging/LogFactory.java

Modified: jakarta/commons/proper/logging/trunk/src/java/org/apache/commons/logging/LogFactory.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/logging/trunk/src/java/org/apache/commons/logging/LogFactory.java?rev=375866&r1=375865&r2=375866&view=diff
==============================================================================
--- jakarta/commons/proper/logging/trunk/src/java/org/apache/commons/logging/LogFactory.java
(original)
+++ jakarta/commons/proper/logging/trunk/src/java/org/apache/commons/logging/LogFactory.java
Tue Feb  7 21:46:03 2006
@@ -1120,6 +1120,11 @@
                             "Exception while trying to find configuration file "
                             + name + ":" + e.getMessage());
                         return null;
+                    } catch(NoSuchMethodError e) {
+                        // we must be running on a 1.1 JVM which doesn't support
+                        // ClassLoader.getSystemResources; just return null in
+                        // this case.
+                        return null;
                     }
                 }
             };



---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message