Fix for NullPointerException on detach()tags/rel_3_29_0_ga
public void detach() { | public void detach() { | ||||
ClassPool cp = getClassPool(); | ClassPool cp = getClassPool(); | ||||
CtClass obj = cp.removeCached(getName()); | CtClass obj = cp.removeCached(getName()); | ||||
if (obj != this) | |||||
if (obj != null && obj != this) | |||||
cp.cacheCtClass(getName(), obj, false); | cp.cacheCtClass(getName(), obj, false); | ||||
} | } | ||||