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 set to 1.2.5
- State changed from new to open
- Assigned user set to me (at andresteingress)
- Milestone order changed from 1 to 0
-
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! -
me (at andresteingress) October 9th, 2012 @ 06:52 PM
(from [08a045ee2fdd67d3a782cc6484897f62e12ba5f8]) test case for parameter/instance variable resolution problem [#33] https://github.com/andresteingress/gcontracts/commit/08a045ee2fdd67...
-
me (at andresteingress) October 9th, 2012 @ 09:33 PM
(from [fe816e1a0e603ed5d5c82bb4ba6d63bbe6a153a1]) fixed #33 - Error when constructor parameter and instance variables have the same identifier https://github.com/andresteingress/gcontracts/commit/fe816e1a0e603e...
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