I have a Java enum and for defensive programming I use a Switch with a default. This is in case an intern a year from now adds an enum without realizing the consequences. Since enums are public static final they are difficult to mock or inject and invalid case for testing. Thus my code coverage is not 100% and my client gets twitchy even though I have explain the problem. Here is the issue..
Is there any way in Jacoco to ignore the "default" switch on a switch statement from coverage?
No, JaCoCo has no filtering options yet. Future versions might support those, here is a list of filtering candidates:
Sign up for the SourceForge newsletter:
You seem to have CSS turned off.
Please don't fill out this field.