Uploaded image for project: 'Commons Text'
  1. Commons Text
  2. TEXT-211

TextStringBuilder equals method changed behaviour from 1.8 to 1.9

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 1.9
    • 1.10.0
    • None

    Description

      We found a regression (or breaking compatibility change) in the TextStringBuilder equals method when upgrading commons-text from 1.8 to 1.9

       

      The 1.8 version ( https://github.com/apache/commons-text/blob/commons-text-1.8/src/main/java/org/apache/commons/text/TextStringBuilder.java#L2915 ) would only compare the parts of the buffer that fall within the range 0..size.

      The 1.9 version ( https://github.com/apache/commons-text/blob/rel/commons-text-1.9/src/main/java/org/apache/commons/text/TextStringBuilder.java#L1855 ) compares the entire buffer arrays.

      If a TextStringBuilder has extra capacity in the buffer, comparison fails.

       

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              ngeorgiou Nikolaos Georgiou
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 6h 20m
                  6h 20m