cucumber/gherkin — Issue #146: Buggy pretty formatting for Scenario Outlines
Author: aslakhellesoy
Created: 2011-11-16 14:45:32+00:00
State: open
Labels: java, ruby

This is when using Cucumber-JVM:

```gherkin
Scenario Outline: This is an example of a scenario outline
Given this is a scenario outline
When we concatenate with
Then the combined string is

Examples:
|string_1 | string_2 | string_3 |
| hello | world | hello world |
```

Stack trace:

```
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.codehaus.mojo.exec.ExecJavaMojo$1.run(ExecJavaMojo.java:297)
at java.lang.Thread.run(Thread.java:662)
Caused by: java.lang.NullPointerException
at java.util.regex.Matcher.getTextLength(Matcher.java:1140)
at java.util.regex.Matcher.reset(Matcher.java:291)
at java.util.regex.Matcher.(Matcher.java:211)
at java.util.regex.Pattern.matcher(Pattern.java:888)
at gherkin.formatter.PrettyFormatter.indent(PrettyFormatter.java:363)
at gherkin.formatter.PrettyFormatter.printDescription(PrettyFormatter.java:355)
at gherkin.formatter.PrettyFormatter.printStatement(PrettyFormatter.java:111)
at gherkin.formatter.PrettyFormatter.match(PrettyFormatter.java:149)
at cucumber.runtime.World.runStep(World.java:76)
at cucumber.runtime.model.CucumberScenario.runStep(CucumberScenario.java:68)
at cucumber.runtime.model.CucumberScenario.run(CucumberScenario.java:46)
at cucumber.runtime.model.CucumberScenarioOutline.run(CucumberScenarioOutline.java:38)
at cucumber.runtime.Runtime.run(Runtime.java:101)
at cucumber.runtime.Runtime.run(Runtime.java:93)
at cucumber.cli.Main.run(Main.java:77)
at cucumber.cli.Main.main(Main.java:63)
... 6 more
```