Menu

#1355 NullPointerException in a java file having a single comment line

PMD-5.3.2
closed
PMD (2)
PMD
3-Major
Bug
2015-05-18
2015-05-18
No

I get the following error with the attached file:

Execute PMD 5.1.1...
Java version: 1.5
Fail to execute PMD. Following file is ignored: PMDBug.java

java.lang.NullPointerException: null
at net.sourceforge.pmd.lang.ast.AbstractNode.jjtGetChild(AbstractNode.java:82) ~[pmd-5.1.1.jar:na]
at net.sourceforge.pmd.lang.java.ast.ASTCompilationUnit.getPackageDeclaration(ASTCompilationUnit.java:50) ~[pmd-5.1.1.jar:na]
at net.sourceforge.pmd.lang.java.symboltable.ScopeAndDeclarationFinder.createSourceFileScope(ScopeAndDeclarationFinder.java:119) ~[pmd-5.1.1.jar:na]
at net.sourceforge.pmd.lang.java.symboltable.ScopeAndDeclarationFinder.visit(ScopeAndDeclarationFinder.java:131) ~[pmd-5.1.1.jar:na]
at net.sourceforge.pmd.lang.java.ast.ASTCompilationUnit.jjtAccept(ASTCompilationUnit.java:42) ~[pmd-5.1.1.jar:na]
at net.sourceforge.pmd.lang.java.symboltable.SymbolFacade.initializeWith(SymbolFacade.java:11) ~[pmd-5.1.1.jar:na]
at net.sourceforge.pmd.lang.java.AbstractJavaHandler$3.start(AbstractJavaHandler.java:74) ~[pmd-5.1.1.jar:na]
at net.sourceforge.pmd.SourceCodeProcessor.symbolFacade(SourceCodeProcessor.java:104) ~[pmd-5.1.1.jar:na]

1 Attachments

Discussion

  • Andreas Dangel

    Andreas Dangel - 2015-05-18
    • status: open --> closed
    • assigned_to: Andreas Dangel
    • Milestone: New Tickets --> PMD-5.3.2
    • Ruleset / Rule: -->
     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.