superclass constructor is NOT covered in Eclemma

23 views
Skip to first unread message

jagade...@gmail.com

unread,
May 28, 2018, 2:40:37 AM5/28/18
to JaCoCo and EclEmma Users
Hi,
w
The below syntax for calling a superclass constructor is

super(); // Showing RED
or:
super(parameter list);// Showing RED

Ex:
public class customException extends FieldException {

private static final long serialVersionUID = 1L;
public static final Color MANDATORY = new Color(255, 231, 231); //Showing RED

public customException (List<JComponent> notSetComponents) {
super(MessageKey.FIELD_PAST_WEEK_ERROR, notSetComponents);// Showing RED
}

protected Color getMarkColor() {
return MANDATORY;
}

}

Super constructor is not covered.
Could you help me on this.

Marc Hoffmann

unread,
May 28, 2018, 3:00:00 AM5/28/18
to jac...@googlegroups.com
Hi,

hard to tell what the snippets mean.

Can you please provide the full source of a class which demonstates the problem? Also a corresponding test (or a simple main) can help to understand the issue.

Thanks,
-marc
> --
> You received this message because you are subscribed to the Google Groups "JaCoCo and EclEmma Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to jacoco+un...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/jacoco/a6481ad4-f885-459e-a35e-31792fd7130d%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

Jagadeesan P

unread,
May 28, 2018, 3:04:22 AM5/28/18
to jac...@googlegroups.com
Thanks for replay.

Full source of a class.
public class PastWeekException extends FieldException {

    private static final long serialVersionUID = 1L;
    public static final Color MANDATORY = new Color(255, 231, 231); //Showing RED

    public PastWeekException(List<JComponent> notSetComponents) {
        super(MessageKey.FIELD_PAST_WEEK_ERROR, notSetComponents); // //Showing RED
    }

    protected Color getMarkColor() {
        return MANDATORY; // //Showing RED
    }

}

This is an custom exception class.
I am beginner for this code coverage.

> To unsubscribe from this group and stop receiving emails from it, send an email to jacoco+unsubscribe@googlegroups.com.
--
You received this message because you are subscribed to the Google Groups "JaCoCo and EclEmma Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jacoco+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jacoco/B9D03EA0-759B-4F7B-AE59-5AC84F1CE466%40mountainminds.com.

Marc Hoffmann

unread,
May 28, 2018, 5:43:19 AM5/28/18
to jac...@googlegroups.com
What is FieldException? And how do you execute this class? If even the static initializer for field “MANDATORY” is shown in red this means the class has not been loaded at all.

Please provide a *executable* reproducer, i.e. a Java classes that can be compiled and executed so we can reproduce your issue. Preferable a small Github project that can be cloned.


On 28. May 2018, at 09:04, Jagadeesan P <jagade...@gmail.com> wrote:

super(MessageKey.FIELD_PAST_WEEK_ERROR, notSetComponents);

Jagadeesan P

unread,
May 28, 2018, 7:03:54 AM5/28/18
to JaCoCo and EclEmma Users
Thanks Mac for your information.

FieldException is a customized exception class, which is extend Java Exception class.

I have cleaned and re build the package and attached java and class files.

One more question, In some class, package line showing yellow color or RED color. any idea.
Even, I have checked line number in the class file as well.
PastWeekException.java
Document1.txt
Reply all
Reply to author
Forward
This conversation is locked
You cannot reply and perform actions on locked conversations.
0 new messages