GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||||||||||||
GeezerVison is showing github.com — Auto-port 4.1: Fix AsciiString.contains(...) false negatives after a partial match by netty-project-bot · Pull Request #17986 · netty/netty Conversation
Contributor
Auto-port of #17975 to 4.1 Motivation:
Netty does not call these methods itself, but they are public API and have behaved like this since they were added in 4.1.0.Beta7. Modification: Check every start position in Result:
Before: After: I also compared both methods with The new assertions fail before the change.
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions…17975) Motivation: `AsciiString.contains(CharSequence, CharSequence)` and `containsIgnoreCase(CharSequence, CharSequence)` compare `b` with `a` one character at a time. When a character does not match after a partial match, they continue with the next character of `a` and start over with the first character of `b`, so a match that begins inside the partial match is missed: `contains("aab", "ab")` and `contains("ababc", "abc")` return `false`, as does `containsIgnoreCase("xxYz", "xyz")`. Netty does not call these methods itself, but they are public API and have behaved like this since they were added in 4.1.0.Beta7. Modification: Check every start position in `a` with `regionMatchesCharSequences(...)` and the same `CharEqualityComparator`. Add these cases to `testContains`. Result: `contains(...)` and `containsIgnoreCase(...)` return `true` whenever `b` occurs in `a`. (cherry picked from commit b7f1c9c)
|
There was an error while loading. Please reload this page.
🚨 TestLens detected 4 failed tests 🚨Test SummaryTip Inspect all details with the TestLens CLI: Build PR / macos-aarch64-java8-boringssl build > Netty/Transport/Native/KQueue
Build PR / macos-x86_64-java8-boringssl build > Netty/Transport/Native/KQueue
🏷️ Commit: 4b3867a Test FailuresKQueueDatagramUnicastIPv6MappedTest > testSimpleSendCompositeHeapByteBuf(TestInfo) (Netty/Transport/Native/KQueue in Build PR / macos-aarch64-java8-boringssl build)KQueueDatagramUnicastIPv6MappedTest > testSimpleSendCompositeMixedByteBuf(TestInfo) (Netty/Transport/Native/KQueue in Build PR / macos-aarch64-java8-boringssl build)KQueueDatagramUnicastIPv6MappedTest > testSimpleSendWithConnect(TestInfo) (Netty/Transport/Native/KQueue in Build PR / macos-aarch64-java8-boringssl build)KQueueETSocketHalfClosedTest > testAutoCloseFalseDoesShutdownOutput(TestInfo) (Netty/Transport/Native/KQueue in Build PR / macos-x86_64-java8-boringssl build)Rerun ControlsSelect tests to mute in this pull request:
Reuse successful test results:
Click the checkbox to trigger a rerun:
Learn more about TestLens at testlens.app/docs. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
…partial match (netty#17986) Auto-port of netty#17975 to 4.1 Cherry-picked commit: b7f1c9c --- Motivation: `AsciiString.contains(CharSequence, CharSequence)` and `containsIgnoreCase(CharSequence, CharSequence)` compare `b` with `a` one character at a time. When a character does not match after a partial match, they continue with the next character of `a` and start over with the first character of `b`, so a match that begins inside the partial match is missed: `contains("aab", "ab")` and `contains("ababc", "abc")` return `false`, as does `containsIgnoreCase("xxYz", "xyz")`. Netty does not call these methods itself, but they are public API and have behaved like this since they were added in 4.1.0.Beta7. Modification: Check every start position in `a` with `regionMatchesCharSequences(...)` and the same `CharEqualityComparator`. Add these cases to `testContains`. Result: `contains(...)` and `containsIgnoreCase(...)` return `true` whenever `b` occurs in `a`. Co-authored-by: CCCLL <[email protected]>
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.