AryanRG opened a new pull request, #751:
URL: https://github.com/apache/commons-collections/pull/751

   ## Summary
   - Bound the end of the final `ListUtils.partition()` slice using the 
remaining element count. The previous `start + size` could overflow before 
`Math.min`.
   - Add a virtual `Integer.MAX_VALUE`-element list test, so the failing case 
needs no large allocation.
   - Link the fix to the next release notes.
   
   Jira: https://issues.apache.org/jira/browse/COLLECTIONS-901
   
   This is separate from COLLECTIONS-673, which fixed overflow in 
`Partition.size()`; this failure is in `Partition.get()`.
   
   ## Validation
   - The new test fails on unmodified master with `fromIndex(1073741825) > 
toIndex(-2147483646)` and passes with this change. The exact code diff passed 
independent review; `ListUtilsTest` ran 28 tests without failure.
   - The default Maven goal passed on the final three-file commit with `mvn -q` 
on macOS/JDK 27. `xmllint --noout src/changes/changes.xml` and `git diff 
--check` passed.
   - Hosted CI is pending.
   
   ## AI assistance
   Kiro with Claude Opus 5.5 assisted with the initial code and regression 
test. A separate Kiro review checked the exact code diff and independently 
reproduced the failure before and success after the fix.
   
   ## Checklist
   - [x] Read this project's contribution guidelines.
   - [x] Read the ASF Generative Tooling Guidance.
   - [x] Disclosed the AI tool and extent of assistance above.
   - [x] Ran the default Maven goal successfully.
   - [x] Added a regression test that fails without the runtime change.
   - [x] Explained the change, reason, and validation.
   - [x] Used a meaningful Jira-keyed commit subject and body.


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