A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/pmd/pmd/issues/788 below:

[apex] Method chaining breaks ApexCRUDViolation · Issue #788 · pmd/pmd · GitHub

Affects Version: 6.0.0
Rule Set:
https://github.com/pmd/pmd/blob/master/pmd-apex/src/main/java/net/sourceforge/pmd/lang/apex/rule/security/ApexCRUDViolationRule.java

Description:

WARNUNG: This analysis could be faster, please consider using Incremental Analysis: https://pmd.github.io/pmd/pmd_userdocs_getting_started.html#incremental-analysis
java.lang.RuntimeException: net.sourceforge.pmd.PMDException: Error while processing n/a
at net.sourceforge.pmd.testframework.RuleTst.runTestFromString(RuleTst.java:275)
at net.sourceforge.pmd.testframework.RuleTst.runTestFromString(RuleTst.java:280)
at net.sourceforge.pmd.testframework.RuleTst.processUsingStringReader(RuleTst.java:247)
at net.sourceforge.pmd.testframework.RuleTst.runTest(RuleTst.java:139)
at net.sourceforge.pmd.testframework.RuleTestRunner$2.evaluate(RuleTestRunner.java:116)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
at net.sourceforge.pmd.testframework.RuleTestRunner.runChild(RuleTestRunner.java:101)
at net.sourceforge.pmd.testframework.RuleTestRunner.runChild(RuleTestRunner.java:36)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
at net.sourceforge.pmd.testframework.PMDTestRunner.run(PMDTestRunner.java:95)
at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:68)
at com.intellij.rt.execution.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:47)
at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:242)
at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:70)
Caused by: net.sourceforge.pmd.PMDException: Error while processing n/a
at net.sourceforge.pmd.SourceCodeProcessor.processSourceCode(SourceCodeProcessor.java:101)
at net.sourceforge.pmd.testframework.RuleTst.runTestFromString(RuleTst.java:273)
... 19 more
Caused by: java.lang.NullPointerException
at net.sourceforge.pmd.lang.apex.rule.security.ApexCRUDViolationRule.isLastMethodName(ApexCRUDViolationRule.java:325)
at net.sourceforge.pmd.lang.apex.rule.security.ApexCRUDViolationRule.collectCRUDMethodLevelChecks(ApexCRUDViolationRule.java:311)
at net.sourceforge.pmd.lang.apex.rule.security.ApexCRUDViolationRule.visit(ApexCRUDViolationRule.java:116)
at net.sourceforge.pmd.lang.apex.ast.ASTMethodCallExpression.jjtAccept(ASTMethodCallExpression.java:19)
at net.sourceforge.pmd.lang.apex.ast.AbstractApexNode.childrenAccept(AbstractApexNode.java:108)
at net.sourceforge.pmd.lang.apex.rule.AbstractApexRule.visit(AbstractApexRule.java:142)
at net.sourceforge.pmd.lang.apex.rule.AbstractApexRule.visit(AbstractApexRule.java:448)
at net.sourceforge.pmd.lang.apex.ast.ASTPrefixExpression.jjtAccept(ASTPrefixExpression.java:16)
at net.sourceforge.pmd.lang.apex.ast.AbstractApexNode.childrenAccept(AbstractApexNode.java:108)
at net.sourceforge.pmd.lang.apex.rule.AbstractApexRule.visit(AbstractApexRule.java:142)
at net.sourceforge.pmd.lang.apex.rule.AbstractApexRule.visit(AbstractApexRule.java:473)
at net.sourceforge.pmd.lang.apex.ast.ASTStandardCondition.jjtAccept(ASTStandardCondition.java:16)
at net.sourceforge.pmd.lang.apex.ast.AbstractApexNode.childrenAccept(AbstractApexNode.java:108)
at net.sourceforge.pmd.lang.apex.rule.AbstractApexRule.visit(AbstractApexRule.java:142)
at net.sourceforge.pmd.lang.apex.rule.AbstractApexRule.visit(AbstractApexRule.java:233)
at net.sourceforge.pmd.lang.apex.ast.ASTIfBlockStatement.jjtAccept(ASTIfBlockStatement.java:16)
at net.sourceforge.pmd.lang.apex.ast.AbstractApexNode.childrenAccept(AbstractApexNode.java:108)
at net.sourceforge.pmd.lang.apex.rule.AbstractApexRule.visit(AbstractApexRule.java:142)
at net.sourceforge.pmd.lang.apex.rule.AbstractApexRule.visit(AbstractApexRule.java:228)
at net.sourceforge.pmd.lang.apex.ast.ASTIfElseBlockStatement.jjtAccept(ASTIfElseBlockStatement.java:16)
at net.sourceforge.pmd.lang.apex.ast.AbstractApexNode.childrenAccept(AbstractApexNode.java:108)
at net.sourceforge.pmd.lang.apex.rule.AbstractApexRule.visit(AbstractApexRule.java:142)
at net.sourceforge.pmd.lang.apex.rule.AbstractApexRule.visit(AbstractApexRule.java:168)
at net.sourceforge.pmd.lang.apex.ast.ASTBlockStatement.jjtAccept(ASTBlockStatement.java:17)
at net.sourceforge.pmd.lang.apex.ast.AbstractApexNode.childrenAccept(AbstractApexNode.java:108)
at net.sourceforge.pmd.lang.apex.rule.AbstractApexRule.visit(AbstractApexRule.java:142)
at net.sourceforge.pmd.lang.apex.rule.AbstractApexRule.visit(AbstractApexRule.java:148)
at net.sourceforge.pmd.lang.apex.ast.ASTMethod.jjtAccept(ASTMethod.java:21)
at net.sourceforge.pmd.lang.apex.ast.AbstractApexNode.childrenAccept(AbstractApexNode.java:108)
at net.sourceforge.pmd.lang.apex.rule.AbstractApexRule.visit(AbstractApexRule.java:142)
at net.sourceforge.pmd.lang.apex.rule.AbstractApexRule.visit(AbstractApexRule.java:153)
at net.sourceforge.pmd.lang.apex.rule.security.ApexCRUDViolationRule.visit(ApexCRUDViolationRule.java:111)
at net.sourceforge.pmd.lang.apex.rule.AbstractApexRule.visitAll(AbstractApexRule.java:131)
at net.sourceforge.pmd.lang.apex.rule.AbstractApexRule.apply(AbstractApexRule.java:125)
at net.sourceforge.pmd.RuleSet.apply(RuleSet.java:502)
at net.sourceforge.pmd.RuleSets.apply(RuleSets.java:143)
at net.sourceforge.pmd.SourceCodeProcessor.processSource(SourceCodeProcessor.java:181)
at net.sourceforge.pmd.SourceCodeProcessor.processSourceCode(SourceCodeProcessor.java:95)
... 20 more

java.lang.RuntimeException: "Reproduce Nullpointer" failed

at net.sourceforge.pmd.testframework.RuleTst.runTest(RuleTst.java:143)
at net.sourceforge.pmd.testframework.RuleTestRunner$2.evaluate(RuleTestRunner.java:116)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
at net.sourceforge.pmd.testframework.RuleTestRunner.runChild(RuleTestRunner.java:101)
at net.sourceforge.pmd.testframework.RuleTestRunner.runChild(RuleTestRunner.java:36)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
at net.sourceforge.pmd.testframework.PMDTestRunner.run(PMDTestRunner.java:95)
at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:68)
at com.intellij.rt.execution.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:47)
at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:242)
at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:70)
Caused by: java.lang.RuntimeException: net.sourceforge.pmd.PMDException: Error while processing n/a
at net.sourceforge.pmd.testframework.RuleTst.runTestFromString(RuleTst.java:275)
at net.sourceforge.pmd.testframework.RuleTst.runTestFromString(RuleTst.java:280)
at net.sourceforge.pmd.testframework.RuleTst.processUsingStringReader(RuleTst.java:247)
at net.sourceforge.pmd.testframework.RuleTst.runTest(RuleTst.java:139)
... 16 more
Caused by: net.sourceforge.pmd.PMDException: Error while processing n/a
at net.sourceforge.pmd.SourceCodeProcessor.processSourceCode(SourceCodeProcessor.java:101)
at net.sourceforge.pmd.testframework.RuleTst.runTestFromString(RuleTst.java:273)
... 19 more
Caused by: java.lang.NullPointerException
at net.sourceforge.pmd.lang.apex.rule.security.ApexCRUDViolationRule.isLastMethodName(ApexCRUDViolationRule.java:325)
at net.sourceforge.pmd.lang.apex.rule.security.ApexCRUDViolationRule.collectCRUDMethodLevelChecks(ApexCRUDViolationRule.java:311)
at net.sourceforge.pmd.lang.apex.rule.security.ApexCRUDViolationRule.visit(ApexCRUDViolationRule.java:116)
at net.sourceforge.pmd.lang.apex.ast.ASTMethodCallExpression.jjtAccept(ASTMethodCallExpression.java:19)
at net.sourceforge.pmd.lang.apex.ast.AbstractApexNode.childrenAccept(AbstractApexNode.java:108)
at net.sourceforge.pmd.lang.apex.rule.AbstractApexRule.visit(AbstractApexRule.java:142)
at net.sourceforge.pmd.lang.apex.rule.AbstractApexRule.visit(AbstractApexRule.java:448)
at net.sourceforge.pmd.lang.apex.ast.ASTPrefixExpression.jjtAccept(ASTPrefixExpression.java:16)
at net.sourceforge.pmd.lang.apex.ast.AbstractApexNode.childrenAccept(AbstractApexNode.java:108)
at net.sourceforge.pmd.lang.apex.rule.AbstractApexRule.visit(AbstractApexRule.java:142)
at net.sourceforge.pmd.lang.apex.rule.AbstractApexRule.visit(AbstractApexRule.java:473)
at net.sourceforge.pmd.lang.apex.ast.ASTStandardCondition.jjtAccept(ASTStandardCondition.java:16)
at net.sourceforge.pmd.lang.apex.ast.AbstractApexNode.childrenAccept(AbstractApexNode.java:108)
at net.sourceforge.pmd.lang.apex.rule.AbstractApexRule.visit(AbstractApexRule.java:142)
at net.sourceforge.pmd.lang.apex.rule.AbstractApexRule.visit(AbstractApexRule.java:233)
at net.sourceforge.pmd.lang.apex.ast.ASTIfBlockStatement.jjtAccept(ASTIfBlockStatement.java:16)
at net.sourceforge.pmd.lang.apex.ast.AbstractApexNode.childrenAccept(AbstractApexNode.java:108)
at net.sourceforge.pmd.lang.apex.rule.AbstractApexRule.visit(AbstractApexRule.java:142)
at net.sourceforge.pmd.lang.apex.rule.AbstractApexRule.visit(AbstractApexRule.java:228)
at net.sourceforge.pmd.lang.apex.ast.ASTIfElseBlockStatement.jjtAccept(ASTIfElseBlockStatement.java:16)
at net.sourceforge.pmd.lang.apex.ast.AbstractApexNode.childrenAccept(AbstractApexNode.java:108)
at net.sourceforge.pmd.lang.apex.rule.AbstractApexRule.visit(AbstractApexRule.java:142)
at net.sourceforge.pmd.lang.apex.rule.AbstractApexRule.visit(AbstractApexRule.java:168)
at net.sourceforge.pmd.lang.apex.ast.ASTBlockStatement.jjtAccept(ASTBlockStatement.java:17)
at net.sourceforge.pmd.lang.apex.ast.AbstractApexNode.childrenAccept(AbstractApexNode.java:108)
at net.sourceforge.pmd.lang.apex.rule.AbstractApexRule.visit(AbstractApexRule.java:142)
at net.sourceforge.pmd.lang.apex.rule.AbstractApexRule.visit(AbstractApexRule.java:148)
at net.sourceforge.pmd.lang.apex.ast.ASTMethod.jjtAccept(ASTMethod.java:21)
at net.sourceforge.pmd.lang.apex.ast.AbstractApexNode.childrenAccept(AbstractApexNode.java:108)
at net.sourceforge.pmd.lang.apex.rule.AbstractApexRule.visit(AbstractApexRule.java:142)
at net.sourceforge.pmd.lang.apex.rule.AbstractApexRule.visit(AbstractApexRule.java:153)
at net.sourceforge.pmd.lang.apex.rule.security.ApexCRUDViolationRule.visit(ApexCRUDViolationRule.java:111)
at net.sourceforge.pmd.lang.apex.rule.AbstractApexRule.visitAll(AbstractApexRule.java:131)
at net.sourceforge.pmd.lang.apex.rule.AbstractApexRule.apply(AbstractApexRule.java:125)
at net.sourceforge.pmd.RuleSet.apply(RuleSet.java:502)
at net.sourceforge.pmd.RuleSets.apply(RuleSets.java:143)
at net.sourceforge.pmd.SourceCodeProcessor.processSource(SourceCodeProcessor.java:181)
at net.sourceforge.pmd.SourceCodeProcessor.processSourceCode(SourceCodeProcessor.java:95)
... 20 more

Process finished with exit code 255

Code Sample demonstrating the issue:

https://github.com/financialforcedev/fflib-apex-common/blob/master/fflib/src/classes/fflib_SObjectDomain.cls

Running PMD through: [CLI | Ant | Maven | Gradle | Designer | Other]

All tools

Reported by @SCWells72


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4