projects
/
Mograsim.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Moved sanity check to make more sense
[Mograsim.git]
/
net.mograsim.logic.core
/
src
/
net
/
mograsim
/
logic
/
core
/
types
/
BitVector.java
diff --git
a/net.mograsim.logic.core/src/net/mograsim/logic/core/types/BitVector.java
b/net.mograsim.logic.core/src/net/mograsim/logic/core/types/BitVector.java
index
0bd5ae5
..
4d5365a
100644
(file)
--- a/
net.mograsim.logic.core/src/net/mograsim/logic/core/types/BitVector.java
+++ b/
net.mograsim.logic.core/src/net/mograsim/logic/core/types/BitVector.java
@@
-23,10
+23,10
@@
public final class BitVector implements StrictLogicType<BitVector>, Iterable<Bit
private BitVector(Bit[] bits)
{
private BitVector(Bit[] bits)
{
+ this.bits = Objects.requireNonNull(bits);// do this first to "catch" bits==null before the foreach loop
for (Bit bit : bits)
if (bit == null)
throw new NullPointerException();
for (Bit bit : bits)
if (bit == null)
throw new NullPointerException();
- this.bits = Objects.requireNonNull(bits);
}
public static BitVector of(Bit... bits)
}
public static BitVector of(Bit... bits)