From 8264feb2d63bbdd6a681cdc634ba781be7af0fac Mon Sep 17 00:00:00 2001 From: Srinivasa Segu Date: Fri, 22 Dec 2006 22:06:17 +0000 Subject: [PATCH] Check for null to handle the current thread's Context ClassLoader being null git-svn-id: https://svn.apache.org/repos/asf/incubator/openjpa/trunk@489777 13f79535-47bb-0310-9956-ffa450edef68 --- .../java/org/apache/openjpa/lib/util/MultiClassLoader.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/openjpa-lib/src/main/java/org/apache/openjpa/lib/util/MultiClassLoader.java b/openjpa-lib/src/main/java/org/apache/openjpa/lib/util/MultiClassLoader.java index 82cc6bd16..ebff2c1dd 100644 --- a/openjpa-lib/src/main/java/org/apache/openjpa/lib/util/MultiClassLoader.java +++ b/openjpa-lib/src/main/java/org/apache/openjpa/lib/util/MultiClassLoader.java @@ -215,6 +215,9 @@ public class MultiClassLoader extends ClassLoader { if (loader == THREAD_LOADER) loader = Thread.currentThread().getContextClassLoader(); + if (loader == null) // skip + continue; + rsrc = loader.getResource(name); if (rsrc != null) return rsrc;