cucumber/gherkin — pull request #252 by trfiala (2013-04-22 23:30:28+00:00)
Title: fixed IndexOutOfBoundsException in gherkin java support

This bug manifested itself in cucumber-jvm when running against
a feature with no steps implemented yet. It looked like this
in the maven output:

Scenario: Say hello # cucumber/examples/java/helloworld/helloworld.feature:3
Given I have a hello app with "Howdy"
When I ask it to say hi When I ask it to say hiTests run: 3, Failures: 0, Errors: 2, Skipped: 1, Time elapsed: 0.56 sec <<< FAILURE!
Feature: Hello World Time elapsed: 0.014 sec <<< ERROR!
java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
at java.util.ArrayList.rangeCheck(ArrayList.java:604)
at java.util.ArrayList.get(ArrayList.java:382)
at gherkin.formatter.PrettyFormatter.indentedLocation(PrettyFormatter.java:142)
at gherkin.formatter.PrettyFormatter.printStep(PrettyFormatter.java:255)
at gherkin.formatter.PrettyFormatter.match(PrettyFormatter.java:179)
...