A RetroSearch Logo

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

Search Query:

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

[java] UnnecessaryLocalBeforeReturn false positive with variable captured by method reference · Issue #2167 · pmd/pmd · GitHub

For example:

    public Supplier<Object> create() {
        final Object o = new Object();
        return o::clone; // violation
    }

o is captured, and keeping its declaration separate keeps the code readable (more so with a more complicated RHS).


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