A RetroSearch Logo

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

Search Query:

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

[java] ArrayIsStoredDirectly doesn't consider nested classes · Issue #3613 · pmd/pmd · GitHub

Affects PMD Version: 6.40.0

Rule: ArrayIsStoredDirectly

Description:

When inner/nested classes are used, then these cases are not detected.

Code Sample demonstrating the issue:

public class Foo {
    public class Inner {
        String [] arr;
        void foo (String[] x) {arr = x;} // expected violation
    }
}

Expected outcome:

PMD should report a violation at line 4, but doesn't. This is a false-negative.

Note - found via #2687


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