Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Show explicit error message when field name missed in table header #1014

Merged

Conversation

mgurov
Copy link
Contributor

@mgurov mgurov commented Jun 9, 2016

instead of a StringIndexOutOfBoundsException:

java.lang.StringIndexOutOfBoundsException: String index out of range: 0
at java.lang.String.charAt(String.java:658)
  at cucumber.runtime.table.CamelCaseStringConverter.uncapitalize(CamelCaseStringConverter.java:37)
  at cucumber.runtime.table.CamelCaseStringConverter.map(CamelCaseStringConverter.java:13)
  at cucumber.runtime.table.TableConverter$1.map(TableConverter.java:284)
  at cucumber.runtime.table.TableConverter$1.map(TableConverter.java:281)
  at gherkin.util.FixJava.map(FixJava.java:28)
  at cucumber.runtime.table.TableConverter.convertTopCellsToFieldNames(TableConverter.java:281)
  at cucumber.runtime.table.TableConverter.toListOfComplexType(TableConverter.java:101)
  at cucumber.runtime.table.TableConverter.convert(TableConverter.java:91)
  at cucumber.runtime.StepDefinitionMatch.tableArgument(StepDefinitionMatch.java:97)

Motivation: when doing a larger refactoring on somewhat oversized tables it was not instantly clear what went wrong.

instead of a StringIndexOutOfBoundsException
@mpkorstanje mpkorstanje merged commit f97d465 into cucumber:master Jun 1, 2017
@mpkorstanje
Copy link
Contributor

Cheers!

@lock
Copy link

lock bot commented Oct 25, 2018

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Oct 25, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants