You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by sk...@apache.org on 2006/02/08 06:46:07 UTC

svn commit: r375866 - /jakarta/commons/proper/logging/trunk/src/java/org/apache/commons/logging/LogFactory.java

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