vasiliy-mikhailov commented on PR #696:
URL: 
https://github.com/apache/commons-collections/pull/696#issuecomment-4821094103

   Thanks @garydgregory, and sorry for the red build. You're right that the 
full suite wasn't run.
   
   Honest root cause: I prepare these changes with an AI pipeline, and it had a 
bug where a fix could be recorded as "verified" from a bare `exit 0` without 
the test suite actually having run. So this shipped looking green when it 
wasn't. The change swapped `map.remove(null)` for `map.get(null)` to stop the 
factory from mutating the caller's map, but `remove(null)` was load-bearing: it 
also dropped the `null` entry before the predicate/transformer arrays are 
built, so leaving it in puts a `null` predicate in the array and 
`testSwitchTransformer` hits an NPE in `SwitchTransformer.transform`.
   
   I've fixed the pipeline so a fix is only treated as verified when there is a 
real green test run (actual `Tests run … Failures: 0` output), not a bare exit 
code. And I've pushed a corrected change: copy the map into a `LinkedHashMap` 
(preserving iteration order) and `remove(null)` from the copy, so the caller's 
map is untouched and the arrays are built correctly. Both 
`TransformerUtilsTest#testSwitchTransformer` and the new mutation test pass 
locally now. Thanks for the catch.
   


-- 
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]

Reply via email to