A RetroSearch Logo

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

Search Query:

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

Node was null for default constructor · Issue #5106 · pmd/pmd · GitHub

Affects PMD Version:
7.3.0

Rule: AccessorClassGeneration

Description:

Running the pmd maven task outputs this error to the console. build succeeds but i guess this is not the expected behavior.
The source docode of the project/classes is on github https://github.com/HtmlUnit/htmlunit.
So far i'm doing nothing special - my jdk is openlogic-openjdk-11.0.23+9-windows-x64.

Exception Stacktrace:

[INFO] --- maven-pmd-plugin:3.23.0:pmd (default-cli) @ htmlunit ---
[INFO] PMD version: 7.3.0
[WARNING] Removed misconfigured rule: LoosePackageCoupling cause: No packages or classes specified
[WARNING] Exception applying rule AccessorClassGeneration on file C:\RBRi\git_repo\htmlunit\src\main\java\org\htmlunit\DefaultCredentialsProvider.java, continuing with next rule
org.apache.commons.lang3.exception.ContextedRuntimeException: java.lang.NullPointerException: Node was null
Exception Context:
        [1:Rule applied on node=!debug only! [ConstructorCall:237:35]new SocksProxyAuthenticator()]
---------------------------------
    at net.sourceforge.pmd.util.AssertionUtil.contexted (AssertionUtil.java:236)
    at net.sourceforge.pmd.lang.rule.internal.RuleApplicator.applyOnIndex (RuleApplicator.java:79)
    at net.sourceforge.pmd.lang.rule.internal.RuleApplicator.apply (RuleApplicator.java:57)
    at net.sourceforge.pmd.lang.rule.internal.RuleSets.apply (RuleSets.java:155)
    at net.sourceforge.pmd.lang.impl.PmdRunnable.processSource (PmdRunnable.java:140)
    at net.sourceforge.pmd.lang.impl.PmdRunnable.run (PmdRunnable.java:80)
    at java.util.concurrent.Executors$RunnableAdapter.call (Executors.java:515)
    at java.util.concurrent.FutureTask.run (FutureTask.java:264)
    at java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1128)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:628)
    at java.lang.Thread.run (Thread.java:829)
Caused by: java.lang.NullPointerException: Node was null
    at java.util.Objects.requireNonNull (Objects.java:248)
    at net.sourceforge.pmd.reporting.RuleContext.addViolationWithPosition (RuleContext.java:133)
    at net.sourceforge.pmd.reporting.RuleContext.addViolationWithMessage (RuleContext.java:118)
    at net.sourceforge.pmd.reporting.RuleContext.addViolation (RuleContext.java:91)
    at net.sourceforge.pmd.lang.java.rule.bestpractices.AccessorMethodGenerationRule.checkMemberAccess (AccessorMethodGenerationRule.java:79)
    at net.sourceforge.pmd.lang.java.rule.bestpractices.AccessorClassGenerationRule.visit (AccessorClassGenerationRule.java:48)
    at net.sourceforge.pmd.lang.java.ast.ASTConstructorCall.acceptVisitor (ASTConstructorCall.java:34)
    at net.sourceforge.pmd.lang.java.ast.AbstractJavaNode.acceptVisitor (AbstractJavaNode.java:38)
    at net.sourceforge.pmd.lang.java.rule.AbstractJavaRule.apply (AbstractJavaRule.java:30)
    at net.sourceforge.pmd.lang.rule.RuleReference.apply (RuleReference.java:415)
    at net.sourceforge.pmd.lang.rule.internal.RuleApplicator.applyOnIndex (RuleApplicator.java:77)
    at net.sourceforge.pmd.lang.rule.internal.RuleApplicator.apply (RuleApplicator.java:57)
    at net.sourceforge.pmd.lang.rule.internal.RuleSets.apply (RuleSets.java:155)
    at net.sourceforge.pmd.lang.impl.PmdRunnable.processSource (PmdRunnable.java:140)
    at net.sourceforge.pmd.lang.impl.PmdRunnable.run (PmdRunnable.java:80)
    at java.util.concurrent.Executors$RunnableAdapter.call (Executors.java:515)
    at java.util.concurrent.FutureTask.run (FutureTask.java:264)
    at java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1128)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:628)
    at java.lang.Thread.run (Thread.java:829)
[WARNING] Exception occurred on node !debug only! [ConstructorCall:237:35]new SocksProxyAuthenticator()
[WARNING] There are 1 PMD processing errors:
[WARNING] C:\RBRi\git_repo\htmlunit\src\main\java\org\htmlunit\DefaultCredentialsProvider.java: ContextedRuntimeException: java.lang.NullPointerException: Node was null
Exception Context:
        [1:Rule applied on node=!debug only! [ConstructorCall:237:35]new SocksProxyAuthenticator()]

Code Sample demonstrating the issue:

The source docode of the project/classes is on github https://github.com/HtmlUnit/htmlunit.
So far i'm doing nothing special - my jdk is openlogic-openjdk-11.0.23+9-windows-x64.


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