lenamonj opened a new pull request, #768:
URL: https://github.com/apache/commons-text/pull/768
`StringMatcher.isMatch(CharSequence, int, int, int)` forwards `bufferEnd` in
the `bufferStart` slot:
```java
return isMatch(CharSequenceUtils.toCharArray(buffer), start, bufferEnd,
bufferEnd);
```
A matcher that implements only the abstract `char[]` overload is handed
`bufferStart == bufferEnd` through the `CharSequence` path. `StringSubstitutor`
searches a `TextStringBuilder`, so its matcher calls bind to that overload;
with a caller-supplied prefix matcher that honours `bufferStart`, `new
StringSubstitutor(values).replace("a ${key} b")` returns the input
unsubstituted.
One argument changed. New `StringMatcherTest` fails on master with
`expected: <1> but was: <5>` and `expected: <a value b> but was: <a ${key} b>`.
Verified with the default `mvn` goal (1894 tests, checkstyle, PMD, SpotBugs,
japicmp).
Found by an automated review loop I run; the fix and test were reviewed and
verified by me.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]