style: include NAB_NEEDLESS_BOOLEAN_CONSTANT_CONVERSION (#5149)

* style: use `assertFalse` and `assertTrue`

* style: include `NAB_NEEDLESS_BOOLEAN_CONSTANT_CONVERSION`
This commit is contained in:
Piotr Idzik
2024-05-08 19:11:46 +02:00
committed by GitHub
parent d3bb691f59
commit d2ddec55e5
11 changed files with 47 additions and 43 deletions

View File

@ -26,10 +26,10 @@ public abstract class CompositeLFSR implements BaseLFSR {
private boolean getMajorityBit() {
Map<Boolean, Integer> bitCount = new TreeMap<>();
bitCount.put(false, 0);
bitCount.put(true, 0);
bitCount.put(Boolean.FALSE, 0);
bitCount.put(Boolean.TRUE, 0);
registers.forEach(lfsr -> bitCount.put(lfsr.getClockBit(), bitCount.get(lfsr.getClockBit()) + 1));
return bitCount.get(false) <= bitCount.get(true);
return bitCount.get(Boolean.FALSE) <= bitCount.get(Boolean.TRUE);
}
}