#113 EMMA marks package name as not covered

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

I have several source files. One of them starts like this:

package com.abc.def;

public abstract class AbstractDatabase
{

There are other files in that same package.

This file for some reason has the first line marked in red:

package com.abc.def; <<< MARKED RED

No other lines in the file are marked red, and no other files in that package have their first lines marked red.

Why is EMMA doing this?

Discussion

  • Berin Loritsch
    Berin Loritsch
    2009-12-22

    The only classes I've seen where this happens is for enums. Apparently with enums the Java compiler generates some code and marks it as "line 1", which emma can't distinguish between generated code and code you wrote.

    Another bug suggests it has to do with a class that has no default constructor so that the compiler creates one for you. All Java compiler code should be ignored.