JBehave
  1. JBehave
  2. JBEHAVE-152

Scenario's in the default package cause NullPointerException

    Details

    • Type: Bug Bug
    • Status: Resolved Resolved
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 2.0, 2.0.1, 2.1
    • Fix Version/s: 2.2
    • Component/s: Core
    • Labels:
      None
    • Environment:
      Windows XP
    • Testcase included:
      yes
    • Patch Submitted:
      Yes
    • Number of attachments :
      1

      Description

      I'm playing around with JBehave, and encountered the folloing NullPointerException

      Testcase: testScenario(HeyHeyMyMy): Caused an ERROR
      null
      java.lang.NullPointerException
      at org.jbehave.scenario.parser.UnderscoredCamelCaseResolver.resolve(UnderscoredCamelCaseResolver.java:37)
      at org.jbehave.scenario.parser.ClasspathScenarioDefiner.loadInputStreamFor(ClasspathScenarioDefiner.java:52)
      at org.jbehave.scenario.parser.ClasspathScenarioDefiner.loadScenarioDefinitionsFor(ClasspathScenarioDefiner.java:47)
      at org.jbehave.scenario.AbstractScenario.runScenario(AbstractScenario.java:69)
      at org.jbehave.scenario.JUnitScenario.runScenario(JUnitScenario.java:49)
      at org.jbehave.scenario.JUnitScenario.testScenario(JUnitScenario.java:64)

      I've enclosed a patch for you consideration

      1. JBehave.patch
        2 kB
        Andy Mac Gilvery

        Activity

        Mauro Talevi made changes -
        Field Original Value New Value
        Assignee Mauro Talevi [ maurotalevi ]
        Hide
        Mauro Talevi added a comment -

        Corrected versions

        Show
        Mauro Talevi added a comment - Corrected versions
        Mauro Talevi made changes -
        Fix Version/s 2.2 [ 14670 ]
        Affects Version/s 2.0.1 [ 14549 ]
        Affects Version/s 2.2 [ 14670 ]
        Affects Version/s 2.0 [ 14456 ]
        Affects Version/s 2.1 [ 14547 ]
        Hide
        Mauro Talevi added a comment -

        Committed fix but not the unit test as I could not get it to recognise the default package scenario class.

        Show
        Mauro Talevi added a comment - Committed fix but not the unit test as I could not get it to recognise the default package scenario class.
        Hide
        Mauro Talevi added a comment -

        Added example to verify behaviour.

        Show
        Mauro Talevi added a comment - Added example to verify behaviour.
        Mauro Talevi made changes -
        Resolution Fixed [ 1 ]
        Status Open [ 1 ] Resolved [ 5 ]

          People

          • Assignee:
            Mauro Talevi
            Reporter:
            Andy Mac Gilvery
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: