Environment:
When I try to initialize field as FINAL either on a class level or in a method body a got the illegal access exception. How can i fix this??
Update to non-static final field ...SAMPLE_ID attempted from a different method ($spock_initializeFields) than the initializer method
@wites342 Please add complete stacktrace and/or some code that demonstrates the issue.
Support for JDK 11 was added with https://github.com/spockframework/spock/commit/78b3a4bc88563a947b030f45e73b45cd94fc4b62 so use the 13-SNAPSHOT for now, or wait a bit for Spock 1.3-RC1
Hello @leonard84 , I have the same issue, but I'm using:
Spock 1.3-groovy-2.5
Groovy 2.5.7
JDK 11
Gradle 5.4.1
Tested under MacOS and Ubuntu linux.
Do you have any ideas why it could happen? Based on the discussion above that issue should be resolved. Thanks
@nikita-mishchenko I am seeing this error with Spock 1.3-groovy-2.5 (and 1.2-groovy-2.5) and Groovy 2.5.7 with Java 8 as well.
Most helpful comment
Hello @leonard84 , I have the same issue, but I'm using:
Spock 1.3-groovy-2.5
Groovy 2.5.7
JDK 11
Gradle 5.4.1
Tested under MacOS and Ubuntu linux.
Do you have any ideas why it could happen? Based on the discussion above that issue should be resolved. Thanks