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
This commit is contained in:
Srinivasa Segu 2006-12-22 22:06:17 +00:00
parent 89f0148fb3
commit 8264feb2d6
1 changed files with 3 additions and 0 deletions

View File

@ -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;