Skip to content

Erroneous usage of assert keyword

Using assert keyword in productive code is not the correct way.

E.g. QPartitionOperations.java.findQPartition() uses assert to check that this method is called with at least 2 diagnoses. This is wrong! Throw an exception instead.

Also, findQPartitionRek() is using assert sucs.remove(p1) which is omitted by the compiler if no -ea flag is set. This does results in a major misbehaviour where this relevant code snipped is not executed because of compiler omission.