You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by "Eric Milles (Jira)" <ji...@apache.org> on 2021/05/18 15:21:00 UTC

[jira] [Resolved] (GROOVY-9887) VerifyError on list any closure with multiple check

     [ https://issues.apache.org/jira/browse/GROOVY-9887?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Eric Milles resolved GROOVY-9887.
---------------------------------
    Fix Version/s: 3.0.8
       Resolution: Fixed

> VerifyError on list any closure with multiple check
> ---------------------------------------------------
>
>                 Key: GROOVY-9887
>                 URL: https://issues.apache.org/jira/browse/GROOVY-9887
>             Project: Groovy
>          Issue Type: Bug
>          Components: groovy-test
>    Affects Versions: 2.5.14
>            Reporter: Alain lavoie
>            Assignee: Eric Milles
>            Priority: Major
>             Fix For: 3.0.8
>
>
> We upgrade org.codehaus.groovy:groovy from 2.5.7 to 2.5.14 and since then, tests are failing because of VerifyErrors. It does not seems to be able to recognize the error. I tried with all version in between and they all work. (this is in our spock test)
> Here is an example of the test broken. (simplified version of the test)
> {code:java}
> def "Test broken"() {
>    given: 
>    def apiCredentialController = new apiCredentialController()
>    when:
>    List<Credential> newCredentials = apiCredentialController.regenerateApiCredentials()
>    then:
>    newCredentials.any { it.key == 'PASSWORD' && it.value != 'Secret' }
> }{code}
> If i do the any with only 1 check it works. When i check for both, i get the following error
> {code:java}
> Condition failed with Exception:
> newCredentials.any { it.key == Credentials.PASSWORD && it.value != S3_SECRET }
> |
> [com.cloudops.mc.plugin.sdk.components.apicredentials.ApiCredentialField@264888e7[key=credentialTwo,sensitive=true,false]]
> 	at com.cloudops.mc.plugin.object.swift.components.SwiftApiCredentialControllerSpec.on regenerateApiCredentials should update S3 credentials for all environments the user is member of(SwiftApiCredentialControllerSpec.groovy:170)
> Caused by: java.lang.VerifyError: (class: com/cloudops/mc/plugin/object/swift/components/SwiftApiCredentialControllerSpec$__spock_feature_0_3_closure3, method: doCall signature: (Ljava/lang/Object;)Ljava/lang/Object;) Illegal target of jump or branch
> 	at com.cloudops.mc.plugin.object.swift.components.SwiftApiCredentialControllerSpec.on regenerateApiCredentials should update S3 credentials for all environments the user is member of(SwiftApiCredentialControllerSpec.groovy:170)
> {code}
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)