Constructor of BitVector now is fail-fast for bits being null
[Mograsim.git] / net.mograsim.logic.core / src / net / mograsim / logic / core / types / BitVector.java
index f92401f..0bd5ae5 100644 (file)
@@ -23,6 +23,9 @@ public final class BitVector implements StrictLogicType<BitVector>, Iterable<Bit
 
        private BitVector(Bit[] bits)
        {
+               for (Bit bit : bits)
+                       if (bit == null)
+                               throw new NullPointerException();
                this.bits = Objects.requireNonNull(bits);
        }