NullPointerException when invoking XPathCLI
A source code analyzer
Brought to you by:
adangel,
juansotuyo
Run this command, I get NPE
java net.sourceforge.pmd.cli.XPathCLI -xpath "//FieldDeclaration" -filename "./Test1.java"
Exception in thread "main" java.lang.NullPointerException
at net.sourceforge.pmd.RuleChain.getRuleChainVisitor(RuleChain.java:71)
at net.sourceforge.pmd.RuleChain.add(RuleChain.java:43)
at net.sourceforge.pmd.RuleChain.add(RuleChain.java:30)
at net.sourceforge.pmd.RuleSets.addRuleSet(RuleSets.java:55)
at net.sourceforge.pmd.RuleSets.<init>(RuleSets.java:43)
at net.sourceforge.pmd.cli.XPathCLI.main(XPathCLI.java:47)
Diff:
Commit: https://github.com/pmd/pmd/commit/74e8e41d15d9069bed47cac399f27152da93ce19