-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
NoWhitespaceAfterCheck for some array initialization crashes Checkstyle #4557
Comments
@denizarsan Please don't report issues using snapshot version. It is unclear what commit you used or if you added any of your own custom code on top of it. Please use release versions and update your first post. Feel free to provide us with a fix. I don't know how easy/hard this will be. |
@rnveach I have updated my post. I'm using the latest release (7.8.2) from https://sourceforge.net/projects/checkstyle/files/checkstyle/ |
I am on it |
checkstyle/contribution@284acd3 is still to be reverted |
commit is reverted in contribution |
I think this issue is fixed. |
is caught by Wercker on checkstyle/sevntu-checkstyle job after uncommenting checkstyle/contribution@284acd3, @sergileon please investigate and fix |
i run job on the master and not see exception |
@Vladlis , I do not see problem on master wercker, please share link |
I am closing issue, till smb show we exact and reproducible case |
Hi, I have the same problem as described in the original bug request. If I use the following initialization block, the checkstyle plugin fails with NPE:
Splitting the code to two lines is the workaround, checkstyle is happy with this:
|
please make sure you use checkstyle version 8.3 and above to run without exception. |
Thanks. I have used the default plugin referenced from gradle 4.6 |
$ javac C.java
$ cat C.java
$ cat config.xml
$ java -jar checkstyle-7.8.2-all.jar -c config.xml C.java
The tool crashes with a NPE for the given config and class. The problem is the array-initialization expression that creates an array with concrete values (in this case "1") and then indexes into it.
Please let me know if you want me to help with fixing this.
Attention: suppressed at circleci by - checkstyle/contribution@284acd3
The text was updated successfully, but these errors were encountered: