git-svn-id: http://anonsvn.jboss.org/repos/javassist/trunk@93 30ef5769-5b8d-40dd-aea6-55b5d6557bb3tags/rel_3_17_1_ga
@@ -285,6 +285,10 @@ public class ClassPool { | |||
public Class toClass(CtClass cc) | |||
throws NotFoundException, CannotCompileException, IOException | |||
{ | |||
if (cc.getClassPool() != this) | |||
throw new CannotCompileException( | |||
"not contained in this class pool: " + cc.getName()); | |||
try { | |||
if (classLoader == null) | |||
classLoader = new SimpleLoader(); |