After getting a class not found exception, during class generation, we cannot regenerate the class anymore.
BeanShell 3.0.0-SNAPSHOT.3577
class A {
class B extends A {}
}
// Error: Evaluation Error: Class: A not found in namespace : at Line: 2 : in file: <unknown file> : A
class A {}
// Error: Internal Error: Defining class problem: A: BeanShell cannot yet simultaneously define two or more dependent classes of the same name. Attempt to define: A while defining: A
This is because the class was never removed from the currently being defined classes cache, which amongst other things prevents the generation of a class currently being generated, because the exception prematurely aborts the process before it could be removed. One fix will be to wrap the remove in a finally block, but perhaps we can remove the currently defined cache workaround/hack all together.
After getting a class not found exception, during class generation, we cannot regenerate the class anymore.
This is because the class was never removed from the currently being defined classes cache, which amongst other things prevents the generation of a class currently being generated, because the exception prematurely aborts the process before it could be removed. One fix will be to wrap the remove in a finally block, but perhaps we can remove the currently defined cache workaround/hack all together.