Unable to apply GContracts annotation on Spock methods
Reported by Evgeny Goldin | October 7th, 2011 @ 03:33 PM | in 1.2.5 (closed)
For the following code:
@Requires({ dir && file && path })
def 'check relative path'( String dir, String file, String path )
{
...
}
I get
org.spockframework.util.InternalSpockError: Failed to instantiate spec 'FileBeanSpec'
at org.junit.runner.JUnitCore.run(JUnitCore.java:157)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:120)
Caused by: java.lang.NullPointerException: Cannot invoke method unlock() on null object
at com.goldin.gcommons.specs.FileBeanSpec.invariant_com_goldin_gcommons_specs_FileBeanSpec(FileBeanSpec.groovy)
at com.goldin.gcommons.specs.FileBeanSpec.<init>(FileBeanSpec.groovy)
at java.lang.Class.newInstance0(Class.java:355)
at java.lang.Class.newInstance(Class.java:308)
... 5 more
in IDEA
Comments and changes to this ticket
-

me (at andresteingress) January 15th, 2012 @ 08:35 PM
- → Milestone changed from to 1.2.5
- → State changed from new to open
- → Assigned user changed from to me (at andresteingress)
-

me (at andresteingress) January 15th, 2012 @ 09:03 PM
- → State changed from open to resolved
-

Evgeny Goldin January 15th, 2012 @ 10:13 PM
Hi Andre,
Good to see 1.2.5 addresses this issue. Will it address Groovy 1.8.5? Ever since 1.8.3 I wasn't able to apply GContracts and had to stay with 1.8.2.
Thanks! -

Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
core module