<p>-version 3.16
<ul>
- <li>JIRA JASSIST-126, 127, 144, 145, 146, 147, 149, 150, 152, 153, 155.
+ <li>JIRA JASSIST-126, 127, 144, 145, 146, 147, 149, 150, 151, 152, 153, 155.
<li><code>javassist.bytecode.analysis.ControlFlow</code> was added.
</ul>
throws ClassNotFoundException
{
if (useContextClassLoader)
- return Thread.currentThread().getContextClassLoader()
- .loadClass(name);
+ return Class.forName(name, true, Thread.currentThread().getContextClassLoader());
else
return Class.forName(name);
}
Object obj = make(cc.getName());
assertEquals(1, invoke(obj, "test"));
}
+
+ public void testJIRA151() {
+ // try it using classloader of TestDescForName Desc.useContextClassLoader = false;
+ assertTrue(javassist.runtime.Desc.getClazz("[Ljava.lang.String;") != null);
+ //Thread.currentThread().setContextClassLoader(TestDescForName.class.getClassLoader());
+ boolean old = javassist.runtime.Desc.useContextClassLoader;
+ javassist.runtime.Desc.useContextClassLoader = true;
+ assertTrue(javassist.runtime.Desc.getClazz("[Ljava.lang.String;") != null);
+ javassist.runtime.Desc.useContextClassLoader = old;
+ }
}