Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Major
-
Resolution: Cannot Reproduce
-
Affects Version/s: None
-
Fix Version/s: 1.0-beta-6
-
Component/s: None
-
Labels:None
-
Environment:Windows XP
Java 1.4.2_04
groovy-1.0-beta-5
-
Number of attachments :
Description
With the following script:
try {
println "Dosomething"
}
catch (Exception e) {
println "Message: " + e.message
return
}
I get the following exception from a GroovyShell.evaluate()
java.lang.VerifyError: (class: test, method: run signature: ()Ljava/lang/Object
Unable to pop operand off an empty stack
at java.lang.Class.getDeclaredConstructors0(Native Method)
at java.lang.Class.privateGetDeclaredConstructors(Class.java:1610)
at java.lang.Class.getConstructor0(Class.java:1922)
at java.lang.Class.newInstance0(Class.java:278)
at java.lang.Class.newInstance(Class.java:261)
at org.codehaus.groovy.runtime.InvokerHelper.createScript(InvokerHelper.java:379)
at groovy.lang.GroovyShell.parse(GroovyShell.java:362)
at groovy.lang.GroovyShell.parse(GroovyShell.java:344)
at groovy.lang.GroovyShell.evaluate(GroovyShell.java:327)
at RunTest.main(RunTest.java:15)
Exception in thread "main"
with this script:
class Test {
void x() {
try
catch (Exception e)
{ println "Message: " + e.message return }
}
}
I get the following stack dump
java.lang.VerifyError: (class: Test, method: x signature: ()V) Illegal target of jump or branch
at java.lang.Class.getDeclaredConstructors0(Native Method)
at java.lang.Class.privateGetDeclaredConstructors(Class.java:1610)
at java.lang.Class.getConstructor0(Class.java:1922)
at java.lang.Class.newInstance0(Class.java:278)
at java.lang.Class.newInstance(Class.java:261)
at org.codehaus.groovy.runtime.InvokerHelper.createScript(InvokerHelper.java:379)
at groovy.lang.GroovyShell.parse(GroovyShell.java:362)
at groovy.lang.GroovyShell.parse(GroovyShell.java:344)
at groovy.lang.GroovyShell.evaluate(GroovyShell.java:327)
at RunTest.main(RunTest.java:15)
Exception in thread "main"
could not duplicate.
Well my local copy is quite different from b5 now. Lots of changes in the classgenerator, so I'm not sure if this got "fixed" incidentally.