random.nextInt does not take '0' as a valid argument, so ensure numBits is never 0

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1147534 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Shai Erera 2011-07-17 06:00:30 +00:00
parent 561723eca6
commit fb70c7c06c
1 changed files with 1 additions and 1 deletions

View File

@ -197,7 +197,7 @@ public class TestFixedBitSet extends LuceneTestCase {
*/
public void testEquals() {
final int numBits = random.nextInt(2000);
final int numBits = random.nextInt(2000) + 1 /* numBits cannot be 0 */;
FixedBitSet b1 = new FixedBitSet(numBits);
FixedBitSet b2 = new FixedBitSet(numBits);
assertTrue(b1.equals(b2));