WW-3670: JSONWriter cannot load CGLIB classes if its JAR is in SharedLib

Patch provided by Bruno Borges

git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1161630 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Johannes Geppert
2011-08-25 16:30:49 +00:00
parent 465d599054
commit bdf0f0da81
@@ -255,7 +255,7 @@ class JSONWriter {
Method baseAccessor = null;
if (clazz.getName().indexOf("$$EnhancerByCGLIB$$") > -1) {
try {
baseAccessor = Class.forName(
baseAccessor = Thread.currentThread().getContextClassLoader().loadClass(
clazz.getName().substring(0, clazz.getName().indexOf("$$"))).getMethod(
accessor.getName(), accessor.getParameterTypes());
} catch (Exception ex) {