alhudz commented on PR #1725: URL: https://github.com/apache/commons-lang/pull/1725#issuecomment-4782116569
Makes sense, that's the right framing. I've gated the supplementary fold on `SystemUtils.IS_JAVA_1_8`, so the non-String path now mirrors `String#regionMatches` on whatever JDK is running: Java 9+ folds the whole code point, Java 8 stays char-by-char and returns `false` the same way its own `String` does. Passing a `String`, `StringBuilder`, `StringBuffer` or `CharBuffer` to `CSU` now comes out the same on a given JDK, and matches calling `String` directly. For the tests I drive the supplementary rows off the running JDK's `String` result rather than a fixed boolean, and assert `String`, `StringBuilder`, `StringBuffer` and `CharBuffer` all agree with it, so they're green on 8 through 25 instead of only on 9+. `TEST_DATA` keeps the BMP rows that read the same everywhere. Happy to look at `org.apache.commons.codec.binary.CharSequenceUtils` for the same thing once this one lands. -- 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]
