From 6a015667eb88d3f06d04493f1643366a3252f1ff Mon Sep 17 00:00:00 2001 From: Simon Kitching Date: Wed, 8 Feb 2006 05:46:03 +0000 Subject: [PATCH] Fix problem where getResources method causes NoSuchMethodError on 1.1 JVMs, due to lack of ClassLoader.getResources method. See bugzilla #37484. git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/logging/trunk@375866 13f79535-47bb-0310-9956-ffa450edef68 --- src/java/org/apache/commons/logging/LogFactory.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/java/org/apache/commons/logging/LogFactory.java b/src/java/org/apache/commons/logging/LogFactory.java index 3d05b21..b97d4d3 100644 --- a/src/java/org/apache/commons/logging/LogFactory.java +++ b/src/java/org/apache/commons/logging/LogFactory.java @@ -1120,6 +1120,11 @@ public abstract class LogFactory { "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; } } };