Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
1.9
-
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
- links to