You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Executed by : ant
Apex language : trigger code
Rule name: UnusedLocalVariable subset of
<rule ref="category/apex/bestpractices.xml" />
code: trigger leadOwnerUpdate on Lead (after update) { for(Lead Id : Trigger.new) {} }
Error:
Exception applying rule UnusedLocalVariable on file E:\writable\OneDrive\OneDrive - ANkush\Documents\sfdc\src\triggers\leadOwnerUpdate.trigger, continuing with next rule
java.lang.NullPointerException
at net.sourceforge.pmd.lang.apex.rule.bestpractices.UnusedLocalVariableRule.visit(UnusedLocalVariableRule.java:31)
at net.sourceforge.pmd.lang.apex.ast.ASTVariableDeclaration.jjtAccept(ASTVariableDeclaration.java:22)
at net.sourceforge.pmd.lang.apex.rule.ApexRuleChainVisitor.visit(ApexRuleChainVisitor.java:42)
at net.sourceforge.pmd.lang.rule.AbstractRuleChainVisitor.visitAll(AbstractRuleChainVisitor.java:96)
at net.sourceforge.pmd.RuleChain.apply(RuleChain.java:67)
at net.sourceforge.pmd.RuleSets.apply(RuleSets.java:140)
at net.sourceforge.pmd.SourceCodeProcessor.processSource(SourceCodeProcessor.java:194)
at net.sourceforge.pmd.SourceCodeProcessor.processSourceCodeWithoutCache(SourceCodeProcessor.java:107)
at net.sourceforge.pmd.SourceCodeProcessor.processSourceCode(SourceCodeProcessor.java:89)
at net.sourceforge.pmd.SourceCodeProcessor.processSourceCode(SourceCodeProcessor.java:51)
at net.sourceforge.pmd.processor.PmdRunnable.call(PmdRunnable.java:78)
at net.sourceforge.pmd.processor.MonoThreadProcessor.runAnalysis(MonoThreadProcessor.java:29)
at net.sourceforge.pmd.processor.AbstractPMDProcessor.processFiles(AbstractPMDProcessor.java:122)
at net.sourceforge.pmd.PMD.processFiles(PMD.java:310)
at net.sourceforge.pmd.ant.internal.PMDTaskImpl.doTask(PMDTaskImpl.java:196)
at net.sourceforge.pmd.ant.internal.PMDTaskImpl.execute(PMDTaskImpl.java:281)
at net.sourceforge.pmd.ant.PMDTask.execute(PMDTask.java:50)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:293)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
at org.apache.tools.ant.Task.perform(Task.java:352)
at org.apache.tools.ant.Target.execute(Target.java:437)
at org.apache.tools.ant.Target.performTasks(Target.java:458)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1406)
at org.apache.tools.ant.Project.executeTarget(Project.java:1377)
at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
at org.apache.tools.ant.Project.executeTargets(Project.java:1261)
at org.apache.tools.ant.Main.runBuild(Main.java:857)
at org.apache.tools.ant.Main.startAnt(Main.java:236)
at org.apache.tools.ant.launch.Launcher.run(Launcher.java:287)
at org.apache.tools.ant.launch.Launcher.main(Launcher.java:112)
The text was updated successfully, but these errors were encountered:
adangel
changed the title
Exception applying rule UnusedLocalVariable on file
[apex] Exception applying rule UnusedLocalVariable on file
May 29, 2020
adangel
changed the title
[apex] Exception applying rule UnusedLocalVariable on file
[apex] Exception applying rule UnusedLocalVariable on trigger
May 30, 2020
Executed by : ant
Apex language : trigger code
Rule name: UnusedLocalVariable subset of
<rule ref="category/apex/bestpractices.xml" />
code:
trigger leadOwnerUpdate on Lead (after update) { for(Lead Id : Trigger.new) {} }
Error:
The text was updated successfully, but these errors were encountered: