Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Eclipse EclEmma missed instructions

I'm using Eclipse-STS + EclEmma plugin to see coverage of my code. In all my abstract util classes (with only static methods) I see 3 missed instructions (Instructions Counter report) at the class definition line:

enter image description here

No marker available at the left of the red line, so I do not know exactly what are these instructions. Maybe some constructors? What can I do to cover them?

like image 956
madhead - StandWithUkraine Avatar asked Oct 21 '22 17:10

madhead - StandWithUkraine


1 Answers

One way I found to achieve 100% covering is to write a test method like this:

@Test
public void coverage(){
    KeyEscaper a = new KeyEscaper() {
    };
}

As soon as the issue touches only utils classes with all static methods, it's not a problem to instantiate them anonimously in such way.

like image 131
madhead - StandWithUkraine Avatar answered Oct 25 '22 18:10

madhead - StandWithUkraine