scala/scala — pull request #2360 by ihji (2013-04-05 17:17:32+00:00)
Title: SI-7080 improve boundary value checking for BitSet

When BitSet accepts a very large integer such as Integer.MAX_VALUE,
integer overflow possibly occurs in the calculation of boundary value
"nwords * WordLength". This faulty boundary condition causes
empty-iterator problem like following:

scala> import collection.mutable.BitSet
import collection.mutable.BitSet

scala> val x = BitSet(Integer.MAX_VALUE)
x: scala.collection.mutable.BitSet = BitSet()

scala> x.iterator
res0: Iterator[Int] = empty iterator