A RetroSearch Logo

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

Search Query:

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

[java] false positive for UselessQualifiedThis · Issue #1372 · pmd/pmd · GitHub

Affects PMD Version:
6.3

Rule:
UselessQualifiedThis, UnusedPrivateField

Description:
False positive when instance variable is an array (or multidimensional array) with the same name as the class. While the code below doesn't follow standard Java naming conventions, it doesn't use the this keyword, so the UselessQualifiedThis rule should not be relevant.

There is also a false positive for UnusedPrivateField.

Code Sample demonstrating the issue:

public class Board {
    private int[] Board;

    public Board(int[] b) {
        for (int i = 0; i < b.length; i++)
            Board[i] = b[i];
    }

    public int size() {
        return Board.length;
    }
}

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