JBehave
  1. JBehave
  2. JBEHAVE-206

Regex overflow in using Examples table

    Details

    • Type: Bug Bug
    • Status: Resolved Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.3, 2.3.1, 2.3.2
    • Fix Version/s: 2.5
    • Component/s: Core
    • Labels:
      None
    • Environment:
      Windows
    • Number of attachments :
      0

      Description

      It's the old Windows regex issue (http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6337993) that raises its head once more, this time in the examples tables. It seems to be related to the number of rows and how similar they are amongst each other. It also seems to be sensitive to the content of the first couple of columns, i.e. if the first and/or second column content differ the problem does not always manifest itself.

      Solutions: either refactor regex parsing to not use patterns such as (x|y)* or provide an alternative implementation or parser based on a pluggable regex impl, different from the JDK one.

        Activity

        Hide
        Mauro Talevi added a comment -

        One quick workaround could be to support reading content from a file, e.g.

        Examples:

        /path/to/file/with/examples/table

        If the content of the Examples starts with a "|" it would be understood to be inlined, else it would be contained in the file specified by the path.

        Not ideal as it becomes less visible from scenario text, but it would get around the issue of the parsing.

        Show
        Mauro Talevi added a comment - One quick workaround could be to support reading content from a file, e.g. Examples: /path/to/file/with/examples/table If the content of the Examples starts with a "|" it would be understood to be inlined, else it would be contained in the file specified by the path. Not ideal as it becomes less visible from scenario text, but it would get around the issue of the parsing.
        Mauro Talevi made changes -
        Field Original Value New Value
        Fix Version/s 2.5 [ 15850 ]
        Fix Version/s 2.4 [ 15664 ]
        Hide
        Mauro Talevi added a comment -

        Duplicate of JBEHAVE-242.

        Show
        Mauro Talevi added a comment - Duplicate of JBEHAVE-242 .
        Mauro Talevi made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]

          People

          • Assignee:
            Unassigned
            Reporter:
            Mauro Talevi
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: