MapIterationInForEachLoopCheck crashes on classes extending Maps #427
Comments
@karlicoss , please be welcome with PR for fix. extra check for null are ok if all branches/lines coveraged by UTs , coverage rate for this Check is not 100% unfortunately https://github.com/sevntu-checkstyle/sevntu.checkstyle/blob/master/sevntu-checks/pom.xml#L129 but as you improve coverage this will be awesome! |
Full report:
|
rnveach
added a commit
to rnveach/sevntu.checkstyle
that referenced
this issue
May 12, 2017
…eck for map classes
rnveach
added a commit
to rnveach/sevntu.checkstyle
that referenced
this issue
May 12, 2017
…eck for map classes
There is a second NPE, in a different area, if you remove the
|
romani
added a commit
that referenced
this issue
May 13, 2017
fix is merged |
kariem
added a commit
to kariem/sevntu.checkstyle
that referenced
this issue
Jul 26, 2018
…eck for map classes
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I managed to reproduce it in a unit test 0587683, but not really sure how it should be fixed.
Stacktrace:
I could of course quickfix it by adding some null checks here https://github.com/sevntu-checkstyle/sevntu.checkstyle/blob/master/sevntu-checks/src/main/java/com/github/sevntu/checkstyle/checks/coding/MapIterationInForEachLoopCheck.java#L400, but it looks hacky, maybe the fix should be more consistent? If it is okay though, I would be happy to fix it myself and open a PR.
@maxvetrenko I guess you are the author, what do you think?
The text was updated successfully, but these errors were encountered: