Author: mstruk
Date: 2011-10-10 19:04:12 -0400 (Mon, 10 Oct 2011)
New Revision: 7707
Modified:
sandbox/as7_support/branches/gatein-as7/exo.kernel.container/src/main/java/org/exoplatform/container/util/ContainerUtil.java
Log:
Changed classloading to localCL first with TCCL fallback
Modified:
sandbox/as7_support/branches/gatein-as7/exo.kernel.container/src/main/java/org/exoplatform/container/util/ContainerUtil.java
===================================================================
---
sandbox/as7_support/branches/gatein-as7/exo.kernel.container/src/main/java/org/exoplatform/container/util/ContainerUtil.java 2011-10-10
21:22:48 UTC (rev 7706)
+++
sandbox/as7_support/branches/gatein-as7/exo.kernel.container/src/main/java/org/exoplatform/container/util/ContainerUtil.java 2011-10-10
23:04:12 UTC (rev 7707)
@@ -314,17 +314,16 @@
public static Class loadClass(String type) throws ClassNotFoundException
{
- ClassLoader tccl = Thread.currentThread().getContextClassLoader();
ClassLoader localCl = ContainerUtil.class.getClassLoader();
- ClassLoader cl = tccl != null ? tccl : localCl;
try
{
- return cl.loadClass(type);
+ return localCl.loadClass(type);
}
catch (ClassNotFoundException e)
{
- if (cl == tccl)
- return localCl.loadClass(type);
+ ClassLoader tccl = Thread.currentThread().getContextClassLoader();
+ if (tccl != null)
+ return tccl.loadClass(type);
throw e;
}
Show replies by date