Tim Webster
2016-05-30 14:39:35 UTC
Hi,
Pretty minor issue, and not sure where the responsibility lies, but I'm
seeing this and just thought I'd raise it. This is is from the SonarQube
plugin - we're setting an empty default value on the 'regex' parameter for
this rule (via XML - so hence the null). It seems to be the only rule that
doesn't like this.
It's doing a trim() on the parameter value (which is is null). if you
think a change is required on my side please let me know - but this seems
to be the only rule that objects to empty default parameter values.
java.lang.NullPointerException
at
net.sourceforge.pmd.lang.java.rule.comments.CommentDefaultAccessModifierRule.visit(CommentDefaultAccessModifierRule.java:53)
at
net.sourceforge.pmd.lang.java.rule.AbstractJavaRule.visitAll(AbstractJavaRule.java:31)
at
net.sourceforge.pmd.lang.java.rule.AbstractJavaRule.apply(AbstractJavaRule.java:25)
at
net.sourceforge.pmd.lang.rule.AbstractDelegateRule.apply(AbstractDelegateRule.java:215)
at net.sourceforge.pmd.RuleSet.apply(RuleSet.java:307)
at net.sourceforge.pmd.RuleSets.apply(RuleSets.java:125)
at
net.sourceforge.pmd.SourceCodeProcessor.processSource(SourceCodeProcessor.java:146)
at
net.sourceforge.pmd.SourceCodeProcessor.processSourceCode(SourceCodeProcessor.java:76)
at
net.sourceforge.pmd.SourceCodeProcessor.processSourceCode(SourceCodeProcessor.java:43)
Cheers,
Tim
Pretty minor issue, and not sure where the responsibility lies, but I'm
seeing this and just thought I'd raise it. This is is from the SonarQube
plugin - we're setting an empty default value on the 'regex' parameter for
this rule (via XML - so hence the null). It seems to be the only rule that
doesn't like this.
It's doing a trim() on the parameter value (which is is null). if you
think a change is required on my side please let me know - but this seems
to be the only rule that objects to empty default parameter values.
java.lang.NullPointerException
at
net.sourceforge.pmd.lang.java.rule.comments.CommentDefaultAccessModifierRule.visit(CommentDefaultAccessModifierRule.java:53)
at
net.sourceforge.pmd.lang.java.rule.AbstractJavaRule.visitAll(AbstractJavaRule.java:31)
at
net.sourceforge.pmd.lang.java.rule.AbstractJavaRule.apply(AbstractJavaRule.java:25)
at
net.sourceforge.pmd.lang.rule.AbstractDelegateRule.apply(AbstractDelegateRule.java:215)
at net.sourceforge.pmd.RuleSet.apply(RuleSet.java:307)
at net.sourceforge.pmd.RuleSets.apply(RuleSets.java:125)
at
net.sourceforge.pmd.SourceCodeProcessor.processSource(SourceCodeProcessor.java:146)
at
net.sourceforge.pmd.SourceCodeProcessor.processSourceCode(SourceCodeProcessor.java:76)
at
net.sourceforge.pmd.SourceCodeProcessor.processSourceCode(SourceCodeProcessor.java:43)
Cheers,
Tim