A RetroSearch Logo

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

Search Query:

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

[java] ArrayIsStoredDirectly false positive with method call · Issue #1474 · pmd/pmd · GitHub

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]


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