Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

Unable to apply GContracts annotation on Spock methods

#33

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

Reported by Evgeny Goldin · October 7th, 2011 @ 03:33 PM

State: resolved
Milestone: 1.2.5

Activity

  1. me (at andresteingress)
    me (at andresteingress)
    • 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

    January 15th, 2012 @ 08:35 PM

  2. me (at andresteingress)
    me (at andresteingress)
    • State changed from open to resolved

    January 15th, 2012 @ 09:03 PM

  3. Evgeny Goldin
    Evgeny Goldin

    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!

    January 15th, 2012 @ 10:13 PM

  4. me (at andresteingress)
    me (at andresteingress)

    jep, it will address this issue too.

    January 15th, 2012 @ 10:14 PM

  5. me (at andresteingress)
  6. me (at andresteingress)

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.