I have a problem with "messageid deplicate". Then I found it's a bug(
AMQ-5016) in activemq5.9.0 , so I download the activemq5.14.0. I run the BitArrayBinTest.java:
I expect the results to be "true",but the result of running the above code is "false".
I debug the code,and I found a method 'getBin(long index)' in class BitArrayBin. Code as follows:
I think the problem is in code ‘longFirstIndex = (int) (index - (index % BitArray.LONG_SIZE))‘. When index is larger than Integer.MAX_VALUE, longFirstIndex will be negative. I think this line of code should be modified to ‘longFirstIndex = (long) (index - (index % BitArray.LONG_SIZE));’