[jbehave-dev] [jira] Created: (JBEHAVE-371) Leading and trailing spaces in example table cells are removed
Leading and trailing spaces in example table cells are removed -- Key: JBEHAVE-371 URL: http://jira.codehaus.org/browse/JBEHAVE-371 Project: JBehave Issue Type: Bug Components: Core Affects Versions: 3.0.3 Reporter: Frank Grimm Priority: Minor In JBehave Core 3.0.3 all leading and trailing spaces are removed from example table cells. For example, when accessed through the ExamplesTable API (the following table {code} | |A | B | C| | |X | Y | Z| {code} becomes {code} ||A|B|C| ||X|Y|Z| {code} Leading/trailing spaces were not removed for JBehave Core versions older than 3.0.3. So, it might be a regression cause when this http://jira.codehaus.org/browse/JBEHAVE-353 was fixed. At least for me it would be nice to be able to use example tables containing cells with leading/trailing spaces. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira - To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email
[jbehave-dev] [jira] Created: (JBEHAVE-353) Empty example table row causes exception
Empty example table row causes exception Key: JBEHAVE-353 URL: http://jira.codehaus.org/browse/JBEHAVE-353 Project: JBehave Issue Type: Bug Components: Core Environment: JBehave core 3.0.2 Reporter: Frank Grimm Priority: Minor Given the following example table: |C1|C2|C3| JBehave fails to parse the table. It reports the following error: |C1|C2|C3| (FAILED) (java.lang.IndexOutOfBoundsException: Index: 0, Size: 0) The stack trace reads: Caused by: java.lang.IndexOutOfBoundsException: Index: 0, Size: 0 at java.util.ArrayList.RangeCheck(ArrayList.java:547) at java.util.ArrayList.remove(ArrayList.java:387) at org.jbehave.core.model.ExamplesTable.columnsFor(ExamplesTable.java:76) at org.jbehave.core.model.ExamplesTable.parse(ExamplesTable.java:60) at org.jbehave.core.model.ExamplesTable.init(ExamplesTable.java:48) at org.jbehave.core.steps.ParameterConverters$ExamplesTableConverter.convertValue(ParameterConverters.java:328) at org.jbehave.core.steps.ParameterConverters.convert(ParameterConverters.java:68) at org.jbehave.core.steps.StepCreator.convertParameters(StepCreator.java:253) at org.jbehave.core.steps.StepCreator.access$1100(StepCreator.java:25) at org.jbehave.core.steps.StepCreator$5.parametriseStep(StepCreator.java:161) at org.jbehave.core.steps.StepCreator$5.perform(StepCreator.java:129) at org.jbehave.core.embedder.StoryRunner$FineSoFar.run(StoryRunner.java:189) at org.jbehave.core.embedder.StoryRunner.runSteps(StoryRunner.java:174) at org.jbehave.core.embedder.StoryRunner.runScenarioSteps(StoryRunner.java:162) at org.jbehave.core.embedder.StoryRunner.run(StoryRunner.java:84) at org.jbehave.core.embedder.StoryRunner.run(StoryRunner.java:62) at org.jbehave.core.embedder.Embedder.runStoriesAsPaths(Embedder.java:160) ... 43 more Parsing the table works fine if the last row contains at least one space in one of the cells. So |C1|C2|C3| ||| | and |C1|C2|C3| || || works fine. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira - To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email
[jbehave-dev] [jira] Commented: (JBEHAVE-353) Empty example table row causes exception
[ http://jira.codehaus.org/browse/JBEHAVE-353?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=236979#action_236979 ] Frank Grimm commented on JBEHAVE-353: - Sorry, the wiki markup messed up the bug report. The examples should read: This table cannot be parsed: {code} |C1|C2|C3| {code} This table can be parsed: {code} |C1|C2|C3| | ||| {code} and this table can be parsed too: {code} |C1|C2|C3| ||| | {code} Empty example table row causes exception Key: JBEHAVE-353 URL: http://jira.codehaus.org/browse/JBEHAVE-353 Project: JBehave Issue Type: Bug Components: Core Environment: JBehave core 3.0.2 Reporter: Frank Grimm Priority: Minor Given the following example table: |C1|C2|C3| JBehave fails to parse the table. It reports the following error: |C1|C2|C3| (FAILED) (java.lang.IndexOutOfBoundsException: Index: 0, Size: 0) The stack trace reads: Caused by: java.lang.IndexOutOfBoundsException: Index: 0, Size: 0 at java.util.ArrayList.RangeCheck(ArrayList.java:547) at java.util.ArrayList.remove(ArrayList.java:387) at org.jbehave.core.model.ExamplesTable.columnsFor(ExamplesTable.java:76) at org.jbehave.core.model.ExamplesTable.parse(ExamplesTable.java:60) at org.jbehave.core.model.ExamplesTable.init(ExamplesTable.java:48) at org.jbehave.core.steps.ParameterConverters$ExamplesTableConverter.convertValue(ParameterConverters.java:328) at org.jbehave.core.steps.ParameterConverters.convert(ParameterConverters.java:68) at org.jbehave.core.steps.StepCreator.convertParameters(StepCreator.java:253) at org.jbehave.core.steps.StepCreator.access$1100(StepCreator.java:25) at org.jbehave.core.steps.StepCreator$5.parametriseStep(StepCreator.java:161) at org.jbehave.core.steps.StepCreator$5.perform(StepCreator.java:129) at org.jbehave.core.embedder.StoryRunner$FineSoFar.run(StoryRunner.java:189) at org.jbehave.core.embedder.StoryRunner.runSteps(StoryRunner.java:174) at org.jbehave.core.embedder.StoryRunner.runScenarioSteps(StoryRunner.java:162) at org.jbehave.core.embedder.StoryRunner.run(StoryRunner.java:84) at org.jbehave.core.embedder.StoryRunner.run(StoryRunner.java:62) at org.jbehave.core.embedder.Embedder.runStoriesAsPaths(Embedder.java:160) ... 43 more Parsing the table works fine if the last row contains at least one space in one of the cells. So |C1|C2|C3| ||| | and |C1|C2|C3| || || works fine. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira - To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email
[jbehave-dev] [jira] Commented: (JBEHAVE-353) Empty example table row causes exception
[ http://jira.codehaus.org/browse/JBEHAVE-353?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=237014#action_237014 ] Frank Grimm commented on JBEHAVE-353: - Well, in the use case that triggered this error, empty rows (except for the heading row of course) are totally fine. So, ignoring empty rows wouldn't work. Empty example table row causes exception Key: JBEHAVE-353 URL: http://jira.codehaus.org/browse/JBEHAVE-353 Project: JBehave Issue Type: Bug Components: Core Environment: JBehave core 3.0.2 Reporter: Frank Grimm Priority: Minor Fix For: 3.0.3 Given the following example table: |C1|C2|C3| JBehave fails to parse the table. It reports the following error: |C1|C2|C3| (FAILED) (java.lang.IndexOutOfBoundsException: Index: 0, Size: 0) The stack trace reads: Caused by: java.lang.IndexOutOfBoundsException: Index: 0, Size: 0 at java.util.ArrayList.RangeCheck(ArrayList.java:547) at java.util.ArrayList.remove(ArrayList.java:387) at org.jbehave.core.model.ExamplesTable.columnsFor(ExamplesTable.java:76) at org.jbehave.core.model.ExamplesTable.parse(ExamplesTable.java:60) at org.jbehave.core.model.ExamplesTable.init(ExamplesTable.java:48) at org.jbehave.core.steps.ParameterConverters$ExamplesTableConverter.convertValue(ParameterConverters.java:328) at org.jbehave.core.steps.ParameterConverters.convert(ParameterConverters.java:68) at org.jbehave.core.steps.StepCreator.convertParameters(StepCreator.java:253) at org.jbehave.core.steps.StepCreator.access$1100(StepCreator.java:25) at org.jbehave.core.steps.StepCreator$5.parametriseStep(StepCreator.java:161) at org.jbehave.core.steps.StepCreator$5.perform(StepCreator.java:129) at org.jbehave.core.embedder.StoryRunner$FineSoFar.run(StoryRunner.java:189) at org.jbehave.core.embedder.StoryRunner.runSteps(StoryRunner.java:174) at org.jbehave.core.embedder.StoryRunner.runScenarioSteps(StoryRunner.java:162) at org.jbehave.core.embedder.StoryRunner.run(StoryRunner.java:84) at org.jbehave.core.embedder.StoryRunner.run(StoryRunner.java:62) at org.jbehave.core.embedder.Embedder.runStoriesAsPaths(Embedder.java:160) ... 43 more Parsing the table works fine if the last row contains at least one space in one of the cells. So |C1|C2|C3| ||| | and |C1|C2|C3| || || works fine. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira - To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email