GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — [java] NPE in SingularFieldRule with concise resource syntax · Issue #3006 · pmd/pmd

[java] NPE in SingularFieldRule with concise resource syntax #3006

New issue
Copy link
New issue
Copy link
Closed
#3070
Closed
[java] NPE in SingularFieldRule with concise resource syntax#3006
#3070
Copy link
Labels
a:bugPMD crashes or fails to analyse a file.
Milestone
6.31.0

Description

@pagarwal-ignitetech
pagarwal-ignitetech
opened on Jan 13, 2021
Issue body actions

Rule: SingularField

PMD version : pmd 6.30.0

Stacktrace:

 "detail": "java.lang.NullPointerException\r\n\tat 
net.sourceforge.pmd.lang.java.rule.design.SingularFieldRule.visit(SingularFieldRule.java:149)\r\n\tat 
net.sourceforge.pmd.lang.java.ast.ASTFieldDeclaration.jjtAccept(ASTFieldDeclaration.java:59)\r\n\tat 
net.sourceforge.pmd.lang.java.rule.AbstractJavaRule.visit(AbstractJavaRule.java:220)\r\n\tat 
net.sourceforge.pmd.lang.java.rule.AbstractJavaRule.visit(AbstractJavaRule.java:267)\r\n\tat 
net.sourceforge.pmd.lang.java.ast.ASTClassOrInterfaceBodyDeclaration.jjtAccept(ASTClassOrInterfaceBodyDeclaration.java:44)\r\n\tat 
net.sourceforge.pmd.lang.java.rule.AbstractJavaRule.visit(AbstractJavaRule.java:220)\r\n\tat 
net.sourceforge.pmd.lang.java.rule.AbstractJavaRule.visit(AbstractJavaRule.java:262)\r\n\tat 
net.sourceforge.pmd.lang.java.ast.ASTClassOrInterfaceBody.jjtAccept(ASTClassOrInterfaceBody.java:35)\r\n\tat 
net.sourceforge.pmd.lang.java.rule.AbstractJavaRule.visit(AbstractJavaRule.java:220)\r\n\tat 
net.sourceforge.pmd.lang.java.rule.AbstractJavaRule.visit(AbstractJavaRule.java:232)\r\n\tat 
net.sourceforge.pmd.lang.java.rule.AbstractLombokAwareRule.visit(AbstractLombokAwareRule.java:74)\r\n\tat 
net.sourceforge.pmd.lang.java.ast.ASTClassOrInterfaceDeclaration.jjtAccept(ASTClassOrInterfaceDeclaration.java:56)\r\n\tat 
net.sourceforge.pmd.lang.java.rule.AbstractJavaRule.visit(AbstractJavaRule.java:220)\r\n\tat 
net.sourceforge.pmd.lang.java.rule.AbstractJavaRule.visit(AbstractJavaRule.java:417)\r\n\tat 
net.sourceforge.pmd.lang.java.ast.ASTTypeDeclaration.jjtAccept(ASTTypeDeclaration.java:39)\r\n\tat 
net.sourceforge.pmd.lang.java.rule.AbstractJavaRule.visit(AbstractJavaRule.java:220)\r\n\tat 
net.sourceforge.pmd.lang.java.rule.AbstractJavaRule.visit(AbstractJavaRule.java:392)\r\n\tat 
net.sourceforge.pmd.lang.java.rule.AbstractLombokAwareRule.visit(AbstractLombokAwareRule.java:58)\r\n\tat 
net.sourceforge.pmd.lang.java.ast.ASTCompilationUnit.jjtAccept(ASTCompilationUnit.java:44)\r\n\tat 
net.sourceforge.pmd.lang.java.rule.AbstractJavaRule.visitAll(AbstractJavaRule.java:163)\r\n\tat 
net.sourceforge.pmd.lang.java.rule.AbstractJavaRule.apply(AbstractJavaRule.java:157)\r\n\tat 
net.sourceforge.pmd.lang.rule.AbstractDelegateRule.apply(AbstractDelegateRule.java:336)\r\n\tat 
net.sourceforge.pmd.RuleSet.apply(RuleSet.java:659)\r\n\tat 
net.sourceforge.pmd.RuleSets.apply(RuleSets.java:163)\r\n\tat 
net.sourceforge.pmd.SourceCodeProcessor.processSource(SourceCodeProcessor.java:200)\r\n\tat 
net.sourceforge.pmd.SourceCodeProcessor.processSourceCodeWithoutCache(SourceCodeProcessor.java:113)\r\n\tat 
net.sourceforge.pmd.SourceCodeProcessor.processSourceCode(SourceCodeProcessor.java:95)\r\n\tat 
net.sourceforge.pmd.SourceCodeProcessor.processSourceCode(SourceCodeProcessor.java:57)\r\n\tat 
net.sourceforge.pmd.processor.PmdRunnable.call(PmdRunnable.java:85)\r\n\tat 
net.sourceforge.pmd.processor.PmdRunnable.call(PmdRunnable.java:29)\r\n\tat 
java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)\r\n\tat 
java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)\r\n\tat 
java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)\r\n\tat 
java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130)\r\n\tat 
java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:630)\r\n\tat 
java.base/java.lang.Thread.run(Thread.java:832)\r\n"

Activity

  1. pagarwal-ignitetech
    added
    a:bugPMD crashes or fails to analyse a file.
    on Jan 13, 2021
  2. pagarwal-ignitetech commented on Jan 13, 2021

    @pagarwal-ignitetech
    pagarwal-ignitetech
    on Jan 13, 2021
    Author
    More actions

    InferencePipelineAggregator.zip
    the source code file on which I am getting above error.
    using simple ruleset
    <rule ref="category/java/design.xml/SingularField" />

  3. oowekyala
    changed the title [-]NPE at singularFieldRule.java : 149[/-] [+][java] NPE in SingularFieldRule[/+] on Jan 13, 2021
  4. oowekyala
    added this to the 6.31.0 milestone on Jan 13, 2021
  5. oowekyala
    added a commit that references this issue on Jan 17, 2021

    Fix pmd#3006: [java] NPE in SingularFieldRule with concise resource s…

    This issue will close once commit b638bbb is merged into the 'main' branch.
    b638bbb
  6. oowekyala
    changed the title [-][java] NPE in SingularFieldRule[/-] [+][java] NPE in SingularFieldRule with concise resource syntax[/+] on Jan 17, 2021
  7. oowekyala commented on Jan 17, 2021

    @oowekyala
    oowekyala
    on Jan 17, 2021
    Member
    More actions

    Thanks for the report. In the future it would help if you posted a minimal example.

  8. adangel
    closed this as completedin #3070on Jan 22, 2021
  9. adangel
    closed this as completedin b638bbbon Jan 22, 2021
  10. adangel
    added a commit that references this issue on Jan 22, 2021

    [doc] Update release notes, refs #3006

    b0f30e9
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    a:bugPMD crashes or fails to analyse a file.

    Type

    No type

    Projects

    No projects

      Milestone

      • 6.31.0

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402775 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.