Commons Lang
  1. Commons Lang
  2. LANG-112

[lang] Wrong length check in StrTokenizer.StringMatcher

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.2
    • Component/s: None
    • Labels:
      None
    • Environment:

      Operating System: other
      Platform: Other

      Description

      The length check in StringMatcher's isMatch() method causes the matcher to stop
      one character too early. So a match at the very end of the source data won't be
      detected.

        Activity

        Hide
        ggregory@seagullsw.com added a comment -

        Thank you Oliver.
        Patches applied and slightly tweaked.

        Show
        ggregory@seagullsw.com added a comment - Thank you Oliver. Patches applied and slightly tweaked.
        Hide
        Oliver Heger added a comment -

        Created an attachment (id=15932)
        New test case demonstrating the bug

        Show
        Oliver Heger added a comment - Created an attachment (id=15932) New test case demonstrating the bug
        Hide
        Oliver Heger added a comment -

        Created an attachment (id=15931)
        Trivial patch to solve the problem

        Show
        Oliver Heger added a comment - Created an attachment (id=15931) Trivial patch to solve the problem

          People

          • Assignee:
            Unassigned
            Reporter:
            Oliver Heger
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development