checkstyle reports nullpointerexception on multi-catch blocks in static initializer blocks

54 views
Skip to first unread message

André den Hartog

unread,
Feb 19, 2015, 4:09:43 AM2/19/15
to check...@googlegroups.com
Hi,

I'm using Eclipse 4.3.2 with the Checkstyle 6.2 plugin. On the following class:

public class A {

    static {
        try {
            System.out.println("a");
        } catch (IllegalStateException | IllegalArgumentException e) {
            throw new RuntimeException(e);
        }
    }
}

Checkstyle (or the checkstyle plugin) reports:
Got an exception - java.lang.NullPointerException

Regards,
André

Roman Ivanov

unread,
Feb 19, 2015, 9:34:52 AM2/19/15
to André den Hartog, check...@googlegroups.com

Can you share with us configuration that you use ?

--
You received this message because you are subscribed to the Google Groups "checkstyle" group.
To unsubscribe from this group and stop receiving emails from it, send an email to checkstyle+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

André den Hartog

unread,
Feb 19, 2015, 10:38:30 AM2/19/15
to check...@googlegroups.com, hartog...@gmail.com
I've added 2 attachments to this post ...
checkstyle_suppressions.xml
checkstyle_eclipse_plugin.xml

Roman Ivanov

unread,
Feb 19, 2015, 11:07:37 AM2/19/15
to André den Hartog, check...@googlegroups.com
thanks a lot - https://github.com/checkstyle/checkstyle/issues/654
we might have time to fix it very soon and release it at the end of month.

André den Hartog

unread,
Feb 23, 2015, 4:01:32 AM2/23/15
to check...@googlegroups.com, hartog...@gmail.com
Ok, thanks!
Reply all
Reply to author
Forward
0 new messages