groovy-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul King <>
Subject Re: Problems with Groovy 2.4.8 and `final`.
Date Fri, 13 Jan 2017 14:18:20 GMT
It's a known issue that was discovered too late to fix in 2.4.8:

It will be mentioned in the official release announce email when
that gets sent out shortly. Just waiting on confirmation from
Baruch about a particular detail before I send that out.

Cheers, Paul.

On Fri, Jan 13, 2017 at 8:44 AM, Sean Gilligan <> wrote:
> I upgraded my bitcoinj-addons project from Groovy 2.4.7 to Groovy 2.4.8
> today and it broke my build and my integration tests.
> This is the build failure:
> :bitcoinj-cli:compileGroovystartup failed:
> /home/travis/build/msgilligan/bitcoinj-addons/bitcoinj-cli/src/main/groovy/com/msgilligan/bitcoinj/test/CLITestSupport.groovy:
> 14: Apparent variable 'testServers' was found in a static scope but
> doesn't refer to a local variable, static field or class. Possible causes:
> You attempted to reference a variable in the binding or an instance
> variable from a static context.
> You misspelled a classname or statically imported field. Please check
> the spelling.
> You attempted to use a method 'testServers' but left out brackets in a
> place not allowed by the grammar.
>  @ line 14, column 28.
>        final String rpcUser = testServers.rpcTestUser
> You can see the full log here in Travis:
> The following change fixes the build:
> However my integration tests fail unless I remove additional `final`
> modifiers. The integration tests run on a Jenkins server with a
> self-signed SSL cert, but you can see the failure there if you accept
> the cert.
> The test are failing because they're getting `null` values for the
> members. The following changes fix those failures:
> The inheritance in the test code is a little convoluted because I'm
> using both abstract base classes and Groovy traits to bring in
> properties and methods for the tests. But I don't understand why `final`
> would be a problem if the code works without it and the properties are
> truly "final".
> Thanks,
> Sean

View raw message