amitdev / PMD-Intellij

Plugin for doing static analysis in Intellij using PMD
http://plugins.intellij.net/plugin/?id=1137
MIT License
71 stars 24 forks source link

Cannot invoke "String.isEmpty()" because the return value of "net.sourceforge.pmd.RuleViolation.getMethodName()" is null #148

Closed MichaelJustin-VEDA closed 1 year ago

MichaelJustin-VEDA commented 1 year ago

Checking a file with PMD raises this error:

*   Exception caught and swallowed: 

  java.lang.NullPointerException: Cannot invoke "String.isEmpty()" because the return value of "net.sourceforge.pmd.RuleViolation.getMethodName()" is null
at com.intellij.plugins.bodhi.pmd.core.UselessSuppressionsHelper.storeRuleNameForMethod(UselessSuppressionsHelper.java:58)
at com.intellij.plugins.bodhi.pmd.core.PMDResultAsTreeRenderer.renderSuppressedViolations(PMDResultAsTreeRenderer.java:104)
at com.intellij.plugins.bodhi.pmd.core.PMDResultAsTreeRenderer.end(PMDResultAsTreeRenderer.java:90)
at net.sourceforge.pmd.PmdAnalysis.finishRenderers(PmdAnalysis.java:279)
at net.sourceforge.pmd.PmdAnalysis.performAnalysisAndCollectReport(PmdAnalysis.java:243)
at net.sourceforge.pmd.PmdAnalysis.performAnalysis(PmdAnalysis.java:226)

Plugin version: 1.8.27

amitdev commented 1 year ago

Fixed in v1.8.28