Skip to content

False positive for MissingOverride #4598

Closed

Description

@wendigo

Error-prone 2.32.0:

public record BigQueryTransactionHandle(UUID uuid)
        implements ConnectorTransactionHandle
{
    public BigQueryTransactionHandle()
    {
        this(UUID.randomUUID());
    }

    public BigQueryTransactionHandle
    {
        requireNonNull(uuid, "uuid is null");
    }
}

And violation:

[ERROR] BigQueryTransactionHandle.java:[25,12] [MissingOverride] <init> is an explicitly declared accessor method for a record component; expected @Override
[ERROR]     (see https://errorprone.info/bugpattern/MissingOverride)
[ERROR]   Did you mean '@Override public BigQueryTransactionHandle()'?

Related to be99217

cc @cushon

Activity

  1. cpovirk commented on Oct 7, 2024

    @cpovirk
    Member

    Hmm, somehow 81ae61d didn't automatically close this.

  2. wendigo commented on Oct 7, 2024

    @wendigo
    Author

    Thanks @cpovirk !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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