Skip to content

[4.0.0] UnsafeImplementationAsMap false-positive #828

Description

@boris-petrov
def groups = [groups: groupIds] as Map

This leads to UnsafeImplementationAsMap (and UnnecessaryCast) warnings on Groovy 5 and CodeNarc 4. I believe that's a false-positive.

Also, I get UnnecessaryCast warnings in a few places where, if I remove the casts, the code doesn't compile (under Groovy 5 - Groovy 4 works fine). The example above might be such a false-positive for that also, unsure if it's the same issue as I have in other code.

P.S. Also, congrats on the release! :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions