A RetroSearch Logo

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

Search Query:

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

[java] UnusedPrivateMethod for method referenced by lombok.Builder.ObtainVia · Issue #5110 · pmd/pmd · GitHub

Affects PMD Version:
7.3.0

Rule:

UnusedPrivateMethod

Description:

Code Sample demonstrating the issue:

import lombok.Builder;
import lombok.Builder.ObtainVia;

import java.util.Collections;
import java.util.List;

@Builder(toBuilder = true)
public class ObtainViaTest {

    @ObtainVia(method = "fooProvider")
    private List<String> foo;

    private List<String> fooProvider() {
        return Collections.emptyList();
    }
}

Expected outcome:

PMD reports a violation at line 14, but that's wrong. That's a false positive.

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