#112 EMMA marks code that has nothing to execute red

open
Vlad Roubtsov
CORE (51)
5
2009-08-09
2009-08-09
Jim Showalter
No

EMMA marks the line below red. There is nothing in this class that can execute. It should therefore mark it green. Does EMMA mark interfaces red as well?

package com.jimandlisa.vocabutron.testutils;

public final class TestConstants <<< MARKED RED
{
public static final boolean EnableDebug = true;
}

Discussion

  • Jim Showalter
    Jim Showalter
    2009-09-09

    You can close this one--it's due to there not being a default constructor, so the VM creates one, which of course isn't covered. Adding a private default constructor and invoking it via reflection in the unit test makes this problem go away.