parijat1222q opened a new pull request, #754: URL: https://github.com/apache/commons-collections/pull/754
## Problem Jira: https://issues.apache.org/jira/browse/COLLECTIONS-902 `SetUniqueList.removeIf` traverses the list and uniqueness set separately. With a `LinkedList` backing, a deterministic predicate can remove an earlier element and then throw. The set never receives those removals, so `contains` and a later `add` disagree with the list. A successful call also evaluates the predicate twice per element. ## Change Use the existing list/set-aware iterator so each removal keeps both structures consistent. Retain the null-filter check on empty lists. Add three regressions for single evaluation, a throwing predicate, and null handling. Two regressions fail on unchanged source; all three pass with the fix. The defect was also reproduced with the released 4.5.0 jar. ## Validation Linux, Temurin 21.0.13, master `0d09264a50120494a3f37784874ae661b0ecf0b2`: - All 254 actual test classes completed in bounded Maven batches: 22,263 tests, zero failures/errors, 82 existing skips. `BulkTest` is a helper with no runnable tests. - JaCoCo data appended across those batches, then coverage gates passed. - `verify apache-rat:check pmd:check checkstyle:check japicmp:cmp javadoc:javadoc` passed afterward; 18 existing Javadoc warnings. - The initial default build exceeded the execution time limit. This is complete split validation, not a claim that one uninterrupted default `mvn` invocation completed. The BloomFilter batch needed a 1.2 GB heap; no test was weakened or excluded. ## Checklist - [x] Read the contribution guidelines. - [x] Read the ASF Generative Tooling Guidance. - [x] AI assistance: Instinct helped investigate the defect, prepare this small fix and tests, and run validation. The commit includes an `Assisted-By` trailer. - [ ] Run one successful uninterrupted default `mvn` build. See the full split-validation evidence above. - [x] Add regression tests that fail without the runtime fix. - [x] Explain the problem, change, and validation. - [x] Use a meaningful commit with the Jira key. -- 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]
