#33 ✓resolved
Evgeny Goldin

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


Comments and changes to this ticket

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.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

core module

Shared Ticket Bins

People watching this ticket