A RetroSearch Logo

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

Search Query:

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

Method inside static inner class incorrectly reported · Issue #274 · pmd/pmd · GitHub

Rule Set: design.html#AccessorMethodGeneration

Code Sample demonstrating the issue:

public static final Creator<Team> CREATOR = new Creator<Team>() {
    @Override
    public Team createFromParcel(Parcel source) {
        return new Team(source.readString(),
                        source.readString(),
                        source.readString(),
                        source.readString(),
                        source.readString(),
                        source.readString(),
                        getBooleanForInt(source.readInt()), // These are the offending lines
                        getBooleanForInt(source.readInt()), // same
                        getBooleanForInt(source.readInt()), // same
                        source.readLong());
    }

    @Override
    public Team[] newArray(int size) {
        return new Team[size];
    }

    private boolean getBooleanForInt(int value) {
        return value == 1;
    }
};

Running PMD through: Gradle


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