diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ProjectName.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ProjectName.java index 2db62c0e7..d04475ab0 100644 --- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ProjectName.java +++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/ProjectName.java @@ -127,7 +127,7 @@ public boolean equals(Object o) { if (o == this) { return true; } - if (o != null || getClass() == o.getClass()) { + if (o != null && getClass() == o.getClass()) { ProjectName that = ((ProjectName) o); return Objects.equals(this.project, that.project); } diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/SchemaName.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/SchemaName.java index 1b2c9a908..2d8968ddf 100644 --- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/SchemaName.java +++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/SchemaName.java @@ -137,7 +137,7 @@ public boolean equals(Object o) { if (o == this) { return true; } - if (o != null || getClass() == o.getClass()) { + if (o != null && getClass() == o.getClass()) { SchemaName that = ((SchemaName) o); return Objects.equals(this.project, that.project) && Objects.equals(this.schema, that.schema); } diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/SnapshotName.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/SnapshotName.java index 2aba349b3..4642f2323 100644 --- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/SnapshotName.java +++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/SnapshotName.java @@ -137,7 +137,7 @@ public boolean equals(Object o) { if (o == this) { return true; } - if (o != null || getClass() == o.getClass()) { + if (o != null && getClass() == o.getClass()) { SnapshotName that = ((SnapshotName) o); return Objects.equals(this.project, that.project) && Objects.equals(this.snapshot, that.snapshot); diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/SubscriptionName.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/SubscriptionName.java index 8ed44f614..ad49b90dd 100644 --- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/SubscriptionName.java +++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/SubscriptionName.java @@ -137,7 +137,7 @@ public boolean equals(Object o) { if (o == this) { return true; } - if (o != null || getClass() == o.getClass()) { + if (o != null && getClass() == o.getClass()) { SubscriptionName that = ((SubscriptionName) o); return Objects.equals(this.project, that.project) && Objects.equals(this.subscription, that.subscription); diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/TopicName.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/TopicName.java index 8af73d814..6fc356a2b 100644 --- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/TopicName.java +++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/TopicName.java @@ -178,7 +178,7 @@ public boolean equals(Object o) { if (o == this) { return true; } - if (o != null || getClass() == o.getClass()) { + if (o != null && getClass() == o.getClass()) { TopicName that = ((TopicName) o); return Objects.equals(this.project, that.project) && Objects.equals(this.topic, that.topic); }