Skip to content

OneOf is set multiple times with different values #4359

@cushon

Description

@cushon

These calls to OneOf setters in BigtableTableAdminClientWrapper.java overwrite previously set values:

This was noticed because of an Error Prone static check, which reports the following error for that code:

src/main/java/com/google/cloud/bigtable/grpc/BigtableTableAdminClientWrapper.java:240: error: [RedundantSetterCall] The oneof `Target` (set via setDeleteAllDataFromTable, setRowKeyPrefix) was called twice with . Setting the same field multiple times is redundant, and could mask a bug.
            .setRowKeyPrefix(rowKeyPrefix)
                             ^
    (see https://errorprone.info/bugpattern/RedundantSetterCall)
src/main/java/com/google/cloud/bigtable/grpc/BigtableTableAdminClientWrapper.java:258: error: [RedundantSetterCall] The oneof `Target` (set via setDeleteAllDataFromTable, setRowKeyPrefix) was called twice with . Setting the same field multiple times is redundant, and could mask a bug.
            .setRowKeyPrefix(rowKeyPrefix)
                             ^
    (see https://errorprone.info/bugpattern/RedundantSetterCall)

Metadata

Metadata

Assignees

No one assigned

    Labels

    api: bigtableIssues related to the googleapis/java-bigtable-hbase API.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions