Skip to content

FII_USE_FUNCTION_IDENTITY false positive #471

@nmatt

Description

@nmatt

FII_USE_FUNCTION_IDENTITY is shown on the STRING constant in the following example:

interface Parser<T>
{
    T parse(String value);

    static final Parser<String> STRING = s -> s;
}

Although specifying

    static final Parser<String> STRING = Function.<String> identity()::apply;

would work, I'd argue that this doesn't make sense here.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions