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] ArrayIsStoredDirectly false positive with method call · Issue #1474 · pmd/pmd

[java] ArrayIsStoredDirectly false positive with method call #1474

New issue
Copy link
New issue
Copy link
Closed
#3930
Closed
[java] ArrayIsStoredDirectly false positive with method call#1474
#3930
Copy link
Assignees
adangel
Labels
a:false-positivePMD flags a piece of code that is not problematic
Milestone
6.45.0

Description

@kevin-wayne
kevin-wayne
opened on Nov 17, 2018
Issue body actions

Affects PMD Version:
PMD 6.3.0

Rule:
ArrayIsStoredDirectly

Description:
False positive when method contains an array argument that has the same name as a method.

Probably related to #1185.

Code Sample demonstrating the issue:

public class TestArrayIsStoredDirectly {
    public double energy(int x) {
        return 0.0;
    }

    // if energy[] is replace by energy2[], then no ArrayIsStoredDirectly warning
    private void f(double[] energy) {
        energy[0] = energy(1);
    }
}

Rule Property: allowPrivate=false

Running PMD through: [CLI]

Activity

  1. adangel
    added
    a:false-positivePMD flags a piece of code that is not problematic
    on Nov 25, 2018
  2. adangel
    changed the title [-][java] ArrayIsStoredDirectly false positive[/-] [+][java] ArrayIsStoredDirectly false positive with method call[/+] on Apr 21, 2022
  3. adangel
    added this to the 6.45.0 milestone on Apr 21, 2022
  4. adangel
    self-assigned this
    on Apr 21, 2022
  5. adangel
    added a commit that references this issue on Apr 21, 2022

    [java] ArrayIsStoredDirectly - ignore method calls

    This issue will close once commit 5566290 is merged into the 'main' branch.
    5566290
  6. adangel
    closed this as completedin #3930on Apr 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @adangel
    adangel

Labels

a:false-positivePMD flags a piece of code that is not problematic

Type

No type

Projects

No projects

    Milestone

    • 6.45.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.