hickey-ai opened a new pull request, #11459:
URL: https://github.com/apache/rocketmq/pull/11459

   ### Which Issue(s) This PR Fixes
   
   Fixes #11458
   
   ### Brief Description
   
   Correct the reversed capacity comparison in the byte-array constructor. 
Valid partial-byte arrays can be reconstructed and cloned, while logical bit 
lengths beyond the backing storage are rejected. Use a long capacity 
calculation and retain the existing null/empty/non-positive checks and 
defensive copying.
   
   Update two tests that encoded the reversed capacity expectations and add one 
clone regression covering nine bit lengths, retained contents, independent 
storage and logical bounds. This is separate from the index-bound changes in 
#10506.
   
   ### How Did You Test This Change?
   
   - Exact-source utility suite: 28 tests, 3 failing before the fix, all 28 
passing after on Java 8 and Java 21.
   - Native Java 8/Maven 3.6.3: `mvn -B -pl filter -am 
-Dtest=BitsArrayTest,BloomFilterTest,ExpressionTest,FilterSpiTest,ParserTest 
-Dsurefire.failIfNoSpecifiedTests=false -DfailIfNoTests=false test`
   - All 110 filter tests passed, with 0 failures/errors/skips; Checkstyle and 
SpotBugs passed for the reactor code modules. Ancestor modules were compiled 
and checked, their full unit suites were not selected.
   - The published branch Git tree was compared with the tested local tree and 
is identical.
   
   No live broker or message-loss reproduction is claimed; BloomFilter normally 
rounds to whole bytes.
   
   AI assistance: OpenAI Codex was used for investigation, implementation and 
tests; commit messages include tooling provenance.
   


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