Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 1.8.0, 1.8.1
-
Fix Version/s: 1.8.2, 1.9-beta-3
-
Labels:None
-
Environment:Mac - JDK 1.6.0_22
-
Testcase included:yes
-
Number of attachments :
Description
Failing to put a public accessor on the 'name' field of the attached test object causes an error in the bytecode.
The exception is:
<error message="(class: com/peersaver/model/Breaking, method: <clinit> signature: ()V) Incompatible object argument for function call" type="java.lang.VerifyError">java.lang.VerifyError: (class: com/peersaver/model/Breaking, method: <clinit> signature: ()V) Incompatible object argument for function call
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:169)
at com.peersaver.model.BreakingTest.class$(BreakingTest.groovy)
at com.peersaver.model.BreakingTest.$get$$class$com$peersaver$model$Breaking(BreakingTest.groovy)
at com.peersaver.model.BreakingTest.testBreaking(BreakingTest.groovy:23)
</error>
The email conversation with details is here:
http://groovy.329449.n5.nabble.com/VerifyError-when-upgrading-to-Groovy-1-8-1-clinit-problem-around-getter-generation-td4640586.html
The relevant bit, again quoting BlackDragon:
(in the <clinit> bytecode)
"> ALOAD 0
> INVOKEVIRTUAL Quiz.getName() : String
> INVOKEINTERFACE CallSite.call(Object,Object) : Object
it is a pretty bad idea to do a virtual method call from a static
context. Looks like that information is missed on "
Activity
| Field | Original Value | New Value |
|---|---|---|
| Assignee | Jochen Theodorou [ blackdrag ] | |
| Fix Version/s | 1.8.2 [ 17495 ] | |
| Fix Version/s | 1.9-beta-2 [ 17494 ] |
| Status | Open [ 1 ] | Closed [ 6 ] |
| Resolution | Fixed [ 1 ] |