Details
-
Type:
Bug
-
Status:
Resolved
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: None
-
Component/s: None
-
Labels:None
-
Environment:2.5.0
-
Number of attachments :
Description
This issue originates from "marcelll"'s message on NABBLE:
http://www.nabble.com/Compiler-can%27t-find-classes-anymore-%28since-2.5.0%29-tf2737647.html
Hello !
Since the introduction of version 2.5.0 the compiler can't find imported classes anymore.
So i switched back to 2.4.7 which is working correctly for me.
I think it has something to do with a restricted access mentioned in the 2.5.0 release.
I'm using the ClassBodyEvaluater (ClassBodyEvaluator.createFastClassBodyEvaluator...).
How can i make the needed classes visible again for the evaluator ?
Thanks in advance for any answer or code snippet !
Hi Marcelll,
marcelll wrote:
Hello ! Since the introduction of version 2.5.0 the compiler can't find imported classes anymore. So i switched back to 2.4.7 which is working correctly for me. I think it has something to do with a restricted access mentioned in the 2.5.0 release. I'm using the ClassBodyEvaluater (ClassBodyEvaluator.createFastClassBodyEvaluator...). How can i make the needed classes visible again for the evaluator ? Thanks in advance for any answer or code snippet !
I can't reproduce your problem. With JANINO 2.5.1, the following code executes OK:
((Runnable) ClassBodyEvaluator.createFastClassBodyEvaluator(
new Scanner(null, new StringReader(
"import java.util.*;\n" +
"public void run() {\n" + " new ArrayList();\n" + "}\n"
)),
Runnable.class,
null
)).run();
Am I missing something?
CU
Arno