Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
1.0-JSR-5
-
None
-
None
Description
Following groovy code throws java.lang.Verify Error. If I change the second .each to a for loop or remove the if statement with .any, no error is thrown. This code was working with a JSR-05 snapshot from around JAN-30.
def census = []
census << [id:1, longTermClassId:1]
census << [id:4, longTermClassId:2]
def planClassMap = [1:[1], 2:[2]]
census.each { member->
planClassMap.each {pdId, classList -> /
if (classList.isEmpty() || classList.any
)
{ classList << member } }
}
ERROR:
Caught: java.lang.VerifyError: (class: LangVerifyError$_run_closure1_closure2, method: doCall signature: (Ljava/lang/Object;Ljava/la
ng/Object;)Ljava/lang/Object Accessing value from uninitialized register 4
at LangVerifyError$_run_closure1.doCall(LangVerifyError.groovy:6)
at LangVerifyError.run(LangVerifyError.groovy:5)
at LangVerifyError.main(LangVerifyError.groovy)