EvanMi commented on code in PR #8664: URL: https://github.com/apache/rocketmq/pull/8664#discussion_r1751110712
########## filter/src/test/java/org/apache/rocketmq/filter/BitsArrayTest.java: ########## @@ -120,4 +120,18 @@ public void testOr() { assertThat(b1.getBit(i)).isTrue(); } } + + @Test(expected = IllegalArgumentException.class) + public void testBitBoundaryOverflow() { + BitsArray bitsArray = BitsArray.create(16); + assertThat(bitsArray.bitLength()).isEqualTo(16); + bitsArray.getBit(16); + } + + @Test(expected = IllegalArgumentException.class) + public void testByteBoundaryOverflow() { + BitsArray bitsArray = BitsArray.create(16); + assertThat(bitsArray.byteLength() ).isEqualTo(2); Review Comment: 好的~已经处理 -- 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: commits-unsubscr...@rocketmq.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org