Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Not A Problem
-
2.1.0
-
None
-
JDK 1.6u39, IntelliJ IDEA 12.0.3
Description
When I call standard (plain simple) Java methods from within a Groovy script, which is annotated by @TypeChecked it seems that I always get back Java Object instances, which causes static type checking errors.
An example:
for(String output : RuntimeUtil.getErrOutput()) { recordExecutionStep("STDERR", output, "", true); }
Method definitions (written in standard JAVA):
java.util.List<java.lang.String> getErrOutput(); void recordExecutionStep(java.lang.String a, java.lang.String b, java.lang.String c, boolean bSuccess)
Error:
[ERROR] GroovyScript.groovy: 61: [Static type checking] - Cannot find matching method scripts.profile.GroovyScript#recordExecutionStep(java.lang.String, java.lang.Object, java.lang.String, boolean)
So the output String variable is recogniced as a plain Object instance, which causes the error.