Skip to content

Unused code check has problems with records #796

@Luro02

Description

@Luro02

Summary

In the following code:

record Route(List<String> nodes, int utility, int preference) {
    public Route {
        nodes = List.copyOf(nodes);
    }
}

with other code that calls the route.preference()/route.utility() functions, the code is marked as unused.

I think this is related to the new spoon update, where some of the implicit code changed. This might require a PR against spoon

Lint Name

No response

Reproducer

<code>

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingfalse-positiveA lint triggers on something that is correct.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions