Project: clover
Issue CLOV-991: Ternary clauses never executed still get coverage
I don't know if this is disoverable at all, but the following example will work with any ternary statement: @Test public void testTernaryStatement() {	ternaryStatement(true); } public static void ternaryStatement(boolean bool) {	String value = bool ? "true" : "false";	System.out.println(value); } This will mark the entire ternary statement as covered, while the false branch was in fact never triggered. Since Clover is primarily a coverage tool, I marked this issue Major.
Story points: 2