diff --git a/gapic-generator-java/src/main/java/com/google/api/generator/gapic/composer/resourcename/ResourceNameHelperClassComposer.java b/gapic-generator-java/src/main/java/com/google/api/generator/gapic/composer/resourcename/ResourceNameHelperClassComposer.java index 7f07658faf..b558a9d715 100644 --- a/gapic-generator-java/src/main/java/com/google/api/generator/gapic/composer/resourcename/ResourceNameHelperClassComposer.java +++ b/gapic-generator-java/src/main/java/com/google/api/generator/gapic/composer/resourcename/ResourceNameHelperClassComposer.java @@ -1349,8 +1349,8 @@ private static MethodDefinition createEqualsMethod( RelationalOperationExpr.equalToWithExprs( getClassMethodInvocationExpr, getClassMethodInvocationExpr.toBuilder().setExprReferenceExpr(argVarExpr).build()); - LogicalOperationExpr orLogicalExpr = - LogicalOperationExpr.logicalOrWithExprs(oNotEqualsNullExpr, getClassEqualsExpr); + LogicalOperationExpr andLogicalExpr = + LogicalOperationExpr.logicalAndWithExprs(oNotEqualsNullExpr, getClassEqualsExpr); // Create second if statement's body assignment expression. Variable thatVariable = Variable.builder().setName("that").setType(thisClassType).build(); @@ -1399,11 +1399,11 @@ private static MethodDefinition createEqualsMethod( .setConditionExpr(oEqualsThisExpr) .setBody(Arrays.asList(ExprStatement.withExpr(returnTrueExpr))) .build(); - // Code: if (o != null || getClass() == o.getClass()) { FoobarName that = ((FoobarName) o); + // Code: if (o != null && getClass() == o.getClass()) { FoobarName that = ((FoobarName) o); // return ..} IfStatement secondIfStatement = IfStatement.builder() - .setConditionExpr(orLogicalExpr) + .setConditionExpr(andLogicalExpr) .setBody( Arrays.asList( ExprStatement.withExpr(thatAssignmentExpr), diff --git a/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/resourcename/goldens/AgentName.golden b/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/resourcename/goldens/AgentName.golden index 76f96eead8..7b73d8c9c4 100644 --- a/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/resourcename/goldens/AgentName.golden +++ b/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/resourcename/goldens/AgentName.golden @@ -168,7 +168,7 @@ public class AgentName implements ResourceName { if (o == this) { return true; } - if (o != null || getClass() == o.getClass()) { + if (o != null && getClass() == o.getClass()) { AgentName that = ((AgentName) o); return Objects.equals(this.project, that.project) && Objects.equals(this.location, that.location); diff --git a/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/resourcename/goldens/BillingAccountLocationName.golden b/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/resourcename/goldens/BillingAccountLocationName.golden index 68c8b4c472..123088ef24 100644 --- a/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/resourcename/goldens/BillingAccountLocationName.golden +++ b/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/resourcename/goldens/BillingAccountLocationName.golden @@ -124,7 +124,7 @@ public class BillingAccountLocationName implements ResourceName { if (o == this) { return true; } - if (o != null || getClass() == o.getClass()) { + if (o != null && getClass() == o.getClass()) { BillingAccountLocationName that = ((BillingAccountLocationName) o); return Objects.equals(this.billingAccount, that.billingAccount) && Objects.equals(this.location, that.location); diff --git a/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/resourcename/goldens/CollisionResourceName.golden b/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/resourcename/goldens/CollisionResourceName.golden index d28798a6c2..273db9bd66 100644 --- a/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/resourcename/goldens/CollisionResourceName.golden +++ b/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/resourcename/goldens/CollisionResourceName.golden @@ -181,7 +181,7 @@ public class ResourceName implements com.google.api.resourcenames.ResourceName { if (o == this) { return true; } - if (o != null || getClass() == o.getClass()) { + if (o != null && getClass() == o.getClass()) { ResourceName that = ((ResourceName) o); return Objects.equals(this.project, that.project) && Objects.equals(this.location, that.location) diff --git a/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/resourcename/goldens/FoobarName.golden b/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/resourcename/goldens/FoobarName.golden index 4af08e31b7..7a96c37d77 100644 --- a/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/resourcename/goldens/FoobarName.golden +++ b/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/resourcename/goldens/FoobarName.golden @@ -262,7 +262,7 @@ public class FoobarName implements ResourceName { if (o == this) { return true; } - if (o != null || getClass() == o.getClass()) { + if (o != null && getClass() == o.getClass()) { FoobarName that = ((FoobarName) o); return Objects.equals(this.project, that.project) && Objects.equals(this.foobar, that.foobar) diff --git a/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/resourcename/goldens/SessionName.golden b/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/resourcename/goldens/SessionName.golden index d61bb14c47..cb5996f0ed 100644 --- a/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/resourcename/goldens/SessionName.golden +++ b/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/resourcename/goldens/SessionName.golden @@ -111,7 +111,7 @@ public class SessionName implements ResourceName { if (o == this) { return true; } - if (o != null || getClass() == o.getClass()) { + if (o != null && getClass() == o.getClass()) { SessionName that = ((SessionName) o); return Objects.equals(this.session, that.session); } diff --git a/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/resourcename/goldens/TestName.golden b/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/resourcename/goldens/TestName.golden index 1864a4e7f9..0fc68b527a 100644 --- a/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/resourcename/goldens/TestName.golden +++ b/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/resourcename/goldens/TestName.golden @@ -137,7 +137,7 @@ public class TestName implements ResourceName { if (o == this) { return true; } - if (o != null || getClass() == o.getClass()) { + if (o != null && getClass() == o.getClass()) { TestName that = ((TestName) o); return Objects.equals(this.session, that.session) && Objects.equals(this.shardId, that.shardId) diff --git a/showcase/gapic-showcase/proto/src/main/java/com/google/showcase/v1beta1/BlurbName.java b/showcase/gapic-showcase/proto/src/main/java/com/google/showcase/v1beta1/BlurbName.java index 037397e4c8..6bab6a2810 100644 --- a/showcase/gapic-showcase/proto/src/main/java/com/google/showcase/v1beta1/BlurbName.java +++ b/showcase/gapic-showcase/proto/src/main/java/com/google/showcase/v1beta1/BlurbName.java @@ -290,7 +290,7 @@ public boolean equals(Object o) { if (o == this) { return true; } - if (o != null || getClass() == o.getClass()) { + if (o != null && getClass() == o.getClass()) { BlurbName that = ((BlurbName) o); return Objects.equals(this.user, that.user) && Objects.equals(this.legacyUser, that.legacyUser) diff --git a/showcase/gapic-showcase/proto/src/main/java/com/google/showcase/v1beta1/ProfileName.java b/showcase/gapic-showcase/proto/src/main/java/com/google/showcase/v1beta1/ProfileName.java index 6b36159006..fe133f5e34 100644 --- a/showcase/gapic-showcase/proto/src/main/java/com/google/showcase/v1beta1/ProfileName.java +++ b/showcase/gapic-showcase/proto/src/main/java/com/google/showcase/v1beta1/ProfileName.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()) { ProfileName that = ((ProfileName) o); return Objects.equals(this.user, that.user); } diff --git a/showcase/gapic-showcase/proto/src/main/java/com/google/showcase/v1beta1/RoomName.java b/showcase/gapic-showcase/proto/src/main/java/com/google/showcase/v1beta1/RoomName.java index ef6ac1d0fd..36e2739874 100644 --- a/showcase/gapic-showcase/proto/src/main/java/com/google/showcase/v1beta1/RoomName.java +++ b/showcase/gapic-showcase/proto/src/main/java/com/google/showcase/v1beta1/RoomName.java @@ -125,7 +125,7 @@ public boolean equals(Object o) { if (o == this) { return true; } - if (o != null || getClass() == o.getClass()) { + if (o != null && getClass() == o.getClass()) { RoomName that = ((RoomName) o); return Objects.equals(this.room, that.room); } diff --git a/showcase/gapic-showcase/proto/src/main/java/com/google/showcase/v1beta1/SequenceName.java b/showcase/gapic-showcase/proto/src/main/java/com/google/showcase/v1beta1/SequenceName.java index 67bc2719aa..2d262a9bc2 100644 --- a/showcase/gapic-showcase/proto/src/main/java/com/google/showcase/v1beta1/SequenceName.java +++ b/showcase/gapic-showcase/proto/src/main/java/com/google/showcase/v1beta1/SequenceName.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()) { SequenceName that = ((SequenceName) o); return Objects.equals(this.sequence, that.sequence); } diff --git a/showcase/gapic-showcase/proto/src/main/java/com/google/showcase/v1beta1/SequenceReportName.java b/showcase/gapic-showcase/proto/src/main/java/com/google/showcase/v1beta1/SequenceReportName.java index 545441ac85..56a62ac6a5 100644 --- a/showcase/gapic-showcase/proto/src/main/java/com/google/showcase/v1beta1/SequenceReportName.java +++ b/showcase/gapic-showcase/proto/src/main/java/com/google/showcase/v1beta1/SequenceReportName.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()) { SequenceReportName that = ((SequenceReportName) o); return Objects.equals(this.sequence, that.sequence); } diff --git a/showcase/gapic-showcase/proto/src/main/java/com/google/showcase/v1beta1/SessionName.java b/showcase/gapic-showcase/proto/src/main/java/com/google/showcase/v1beta1/SessionName.java index 3a19397c03..288a8f3efb 100644 --- a/showcase/gapic-showcase/proto/src/main/java/com/google/showcase/v1beta1/SessionName.java +++ b/showcase/gapic-showcase/proto/src/main/java/com/google/showcase/v1beta1/SessionName.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()) { SessionName that = ((SessionName) o); return Objects.equals(this.session, that.session); } diff --git a/showcase/gapic-showcase/proto/src/main/java/com/google/showcase/v1beta1/StreamingSequenceName.java b/showcase/gapic-showcase/proto/src/main/java/com/google/showcase/v1beta1/StreamingSequenceName.java index cd67420318..195cf8a57d 100644 --- a/showcase/gapic-showcase/proto/src/main/java/com/google/showcase/v1beta1/StreamingSequenceName.java +++ b/showcase/gapic-showcase/proto/src/main/java/com/google/showcase/v1beta1/StreamingSequenceName.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()) { StreamingSequenceName that = ((StreamingSequenceName) o); return Objects.equals(this.streamingSequence, that.streamingSequence); } diff --git a/showcase/gapic-showcase/proto/src/main/java/com/google/showcase/v1beta1/StreamingSequenceReportName.java b/showcase/gapic-showcase/proto/src/main/java/com/google/showcase/v1beta1/StreamingSequenceReportName.java index 2f636a4005..4fa8cb8696 100644 --- a/showcase/gapic-showcase/proto/src/main/java/com/google/showcase/v1beta1/StreamingSequenceReportName.java +++ b/showcase/gapic-showcase/proto/src/main/java/com/google/showcase/v1beta1/StreamingSequenceReportName.java @@ -129,7 +129,7 @@ public boolean equals(Object o) { if (o == this) { return true; } - if (o != null || getClass() == o.getClass()) { + if (o != null && getClass() == o.getClass()) { StreamingSequenceReportName that = ((StreamingSequenceReportName) o); return Objects.equals(this.streamingSequence, that.streamingSequence); } diff --git a/showcase/gapic-showcase/proto/src/main/java/com/google/showcase/v1beta1/TestName.java b/showcase/gapic-showcase/proto/src/main/java/com/google/showcase/v1beta1/TestName.java index bea1ef0177..ac57fc985d 100644 --- a/showcase/gapic-showcase/proto/src/main/java/com/google/showcase/v1beta1/TestName.java +++ b/showcase/gapic-showcase/proto/src/main/java/com/google/showcase/v1beta1/TestName.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()) { TestName that = ((TestName) o); return Objects.equals(this.session, that.session) && Objects.equals(this.test, that.test); } diff --git a/showcase/gapic-showcase/proto/src/main/java/com/google/showcase/v1beta1/UserName.java b/showcase/gapic-showcase/proto/src/main/java/com/google/showcase/v1beta1/UserName.java index aa6a75a6be..f5c9cff62a 100644 --- a/showcase/gapic-showcase/proto/src/main/java/com/google/showcase/v1beta1/UserName.java +++ b/showcase/gapic-showcase/proto/src/main/java/com/google/showcase/v1beta1/UserName.java @@ -125,7 +125,7 @@ public boolean equals(Object o) { if (o == this) { return true; } - if (o != null || getClass() == o.getClass()) { + if (o != null && getClass() == o.getClass()) { UserName that = ((UserName) o); return Objects.equals(this.user, that.user); } diff --git a/showcase/proto-gapic-showcase-v1beta1/src/main/java/com/google/showcase/v1beta1/BlurbName.java b/showcase/proto-gapic-showcase-v1beta1/src/main/java/com/google/showcase/v1beta1/BlurbName.java index 037397e4c8..6bab6a2810 100644 --- a/showcase/proto-gapic-showcase-v1beta1/src/main/java/com/google/showcase/v1beta1/BlurbName.java +++ b/showcase/proto-gapic-showcase-v1beta1/src/main/java/com/google/showcase/v1beta1/BlurbName.java @@ -290,7 +290,7 @@ public boolean equals(Object o) { if (o == this) { return true; } - if (o != null || getClass() == o.getClass()) { + if (o != null && getClass() == o.getClass()) { BlurbName that = ((BlurbName) o); return Objects.equals(this.user, that.user) && Objects.equals(this.legacyUser, that.legacyUser) diff --git a/showcase/proto-gapic-showcase-v1beta1/src/main/java/com/google/showcase/v1beta1/ProfileName.java b/showcase/proto-gapic-showcase-v1beta1/src/main/java/com/google/showcase/v1beta1/ProfileName.java index 6b36159006..fe133f5e34 100644 --- a/showcase/proto-gapic-showcase-v1beta1/src/main/java/com/google/showcase/v1beta1/ProfileName.java +++ b/showcase/proto-gapic-showcase-v1beta1/src/main/java/com/google/showcase/v1beta1/ProfileName.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()) { ProfileName that = ((ProfileName) o); return Objects.equals(this.user, that.user); } diff --git a/showcase/proto-gapic-showcase-v1beta1/src/main/java/com/google/showcase/v1beta1/RoomName.java b/showcase/proto-gapic-showcase-v1beta1/src/main/java/com/google/showcase/v1beta1/RoomName.java index ef6ac1d0fd..36e2739874 100644 --- a/showcase/proto-gapic-showcase-v1beta1/src/main/java/com/google/showcase/v1beta1/RoomName.java +++ b/showcase/proto-gapic-showcase-v1beta1/src/main/java/com/google/showcase/v1beta1/RoomName.java @@ -125,7 +125,7 @@ public boolean equals(Object o) { if (o == this) { return true; } - if (o != null || getClass() == o.getClass()) { + if (o != null && getClass() == o.getClass()) { RoomName that = ((RoomName) o); return Objects.equals(this.room, that.room); } diff --git a/showcase/proto-gapic-showcase-v1beta1/src/main/java/com/google/showcase/v1beta1/SequenceName.java b/showcase/proto-gapic-showcase-v1beta1/src/main/java/com/google/showcase/v1beta1/SequenceName.java index 67bc2719aa..2d262a9bc2 100644 --- a/showcase/proto-gapic-showcase-v1beta1/src/main/java/com/google/showcase/v1beta1/SequenceName.java +++ b/showcase/proto-gapic-showcase-v1beta1/src/main/java/com/google/showcase/v1beta1/SequenceName.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()) { SequenceName that = ((SequenceName) o); return Objects.equals(this.sequence, that.sequence); } diff --git a/showcase/proto-gapic-showcase-v1beta1/src/main/java/com/google/showcase/v1beta1/SequenceReportName.java b/showcase/proto-gapic-showcase-v1beta1/src/main/java/com/google/showcase/v1beta1/SequenceReportName.java index 545441ac85..56a62ac6a5 100644 --- a/showcase/proto-gapic-showcase-v1beta1/src/main/java/com/google/showcase/v1beta1/SequenceReportName.java +++ b/showcase/proto-gapic-showcase-v1beta1/src/main/java/com/google/showcase/v1beta1/SequenceReportName.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()) { SequenceReportName that = ((SequenceReportName) o); return Objects.equals(this.sequence, that.sequence); } diff --git a/showcase/proto-gapic-showcase-v1beta1/src/main/java/com/google/showcase/v1beta1/SessionName.java b/showcase/proto-gapic-showcase-v1beta1/src/main/java/com/google/showcase/v1beta1/SessionName.java index 3a19397c03..288a8f3efb 100644 --- a/showcase/proto-gapic-showcase-v1beta1/src/main/java/com/google/showcase/v1beta1/SessionName.java +++ b/showcase/proto-gapic-showcase-v1beta1/src/main/java/com/google/showcase/v1beta1/SessionName.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()) { SessionName that = ((SessionName) o); return Objects.equals(this.session, that.session); } diff --git a/showcase/proto-gapic-showcase-v1beta1/src/main/java/com/google/showcase/v1beta1/StreamingSequenceName.java b/showcase/proto-gapic-showcase-v1beta1/src/main/java/com/google/showcase/v1beta1/StreamingSequenceName.java index cd67420318..195cf8a57d 100644 --- a/showcase/proto-gapic-showcase-v1beta1/src/main/java/com/google/showcase/v1beta1/StreamingSequenceName.java +++ b/showcase/proto-gapic-showcase-v1beta1/src/main/java/com/google/showcase/v1beta1/StreamingSequenceName.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()) { StreamingSequenceName that = ((StreamingSequenceName) o); return Objects.equals(this.streamingSequence, that.streamingSequence); } diff --git a/showcase/proto-gapic-showcase-v1beta1/src/main/java/com/google/showcase/v1beta1/StreamingSequenceReportName.java b/showcase/proto-gapic-showcase-v1beta1/src/main/java/com/google/showcase/v1beta1/StreamingSequenceReportName.java index 2f636a4005..4fa8cb8696 100644 --- a/showcase/proto-gapic-showcase-v1beta1/src/main/java/com/google/showcase/v1beta1/StreamingSequenceReportName.java +++ b/showcase/proto-gapic-showcase-v1beta1/src/main/java/com/google/showcase/v1beta1/StreamingSequenceReportName.java @@ -129,7 +129,7 @@ public boolean equals(Object o) { if (o == this) { return true; } - if (o != null || getClass() == o.getClass()) { + if (o != null && getClass() == o.getClass()) { StreamingSequenceReportName that = ((StreamingSequenceReportName) o); return Objects.equals(this.streamingSequence, that.streamingSequence); } diff --git a/showcase/proto-gapic-showcase-v1beta1/src/main/java/com/google/showcase/v1beta1/TestName.java b/showcase/proto-gapic-showcase-v1beta1/src/main/java/com/google/showcase/v1beta1/TestName.java index bea1ef0177..ac57fc985d 100644 --- a/showcase/proto-gapic-showcase-v1beta1/src/main/java/com/google/showcase/v1beta1/TestName.java +++ b/showcase/proto-gapic-showcase-v1beta1/src/main/java/com/google/showcase/v1beta1/TestName.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()) { TestName that = ((TestName) o); return Objects.equals(this.session, that.session) && Objects.equals(this.test, that.test); } diff --git a/showcase/proto-gapic-showcase-v1beta1/src/main/java/com/google/showcase/v1beta1/UserName.java b/showcase/proto-gapic-showcase-v1beta1/src/main/java/com/google/showcase/v1beta1/UserName.java index aa6a75a6be..f5c9cff62a 100644 --- a/showcase/proto-gapic-showcase-v1beta1/src/main/java/com/google/showcase/v1beta1/UserName.java +++ b/showcase/proto-gapic-showcase-v1beta1/src/main/java/com/google/showcase/v1beta1/UserName.java @@ -125,7 +125,7 @@ public boolean equals(Object o) { if (o == this) { return true; } - if (o != null || getClass() == o.getClass()) { + if (o != null && getClass() == o.getClass()) { UserName that = ((UserName) o); return Objects.equals(this.user, that.user); } diff --git a/test/integration/goldens/apigeeconnect/src/com/google/cloud/apigeeconnect/v1/EndpointName.java b/test/integration/goldens/apigeeconnect/src/com/google/cloud/apigeeconnect/v1/EndpointName.java index b740afb976..5fa9394632 100644 --- a/test/integration/goldens/apigeeconnect/src/com/google/cloud/apigeeconnect/v1/EndpointName.java +++ b/test/integration/goldens/apigeeconnect/src/com/google/cloud/apigeeconnect/v1/EndpointName.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()) { EndpointName that = ((EndpointName) o); return Objects.equals(this.project, that.project) && Objects.equals(this.endpoint, that.endpoint); diff --git a/test/integration/goldens/asset/src/com/google/cloud/asset/v1/FeedName.java b/test/integration/goldens/asset/src/com/google/cloud/asset/v1/FeedName.java index 09996c80b1..a3dc5f5fdb 100644 --- a/test/integration/goldens/asset/src/com/google/cloud/asset/v1/FeedName.java +++ b/test/integration/goldens/asset/src/com/google/cloud/asset/v1/FeedName.java @@ -240,7 +240,7 @@ public boolean equals(Object o) { if (o == this) { return true; } - if (o != null || getClass() == o.getClass()) { + if (o != null && getClass() == o.getClass()) { FeedName that = ((FeedName) o); return Objects.equals(this.project, that.project) && Objects.equals(this.feed, that.feed) diff --git a/test/integration/goldens/asset/src/com/google/cloud/asset/v1/FolderName.java b/test/integration/goldens/asset/src/com/google/cloud/asset/v1/FolderName.java index 3fb0e60e68..6544050763 100644 --- a/test/integration/goldens/asset/src/com/google/cloud/asset/v1/FolderName.java +++ b/test/integration/goldens/asset/src/com/google/cloud/asset/v1/FolderName.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()) { FolderName that = ((FolderName) o); return Objects.equals(this.folder, that.folder); } diff --git a/test/integration/goldens/asset/src/com/google/cloud/asset/v1/OrganizationName.java b/test/integration/goldens/asset/src/com/google/cloud/asset/v1/OrganizationName.java index 8f389f7449..c924effa14 100644 --- a/test/integration/goldens/asset/src/com/google/cloud/asset/v1/OrganizationName.java +++ b/test/integration/goldens/asset/src/com/google/cloud/asset/v1/OrganizationName.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()) { OrganizationName that = ((OrganizationName) o); return Objects.equals(this.organization, that.organization); } diff --git a/test/integration/goldens/asset/src/com/google/cloud/asset/v1/ProjectName.java b/test/integration/goldens/asset/src/com/google/cloud/asset/v1/ProjectName.java index 4d429e007b..0f11713b4a 100644 --- a/test/integration/goldens/asset/src/com/google/cloud/asset/v1/ProjectName.java +++ b/test/integration/goldens/asset/src/com/google/cloud/asset/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/test/integration/goldens/asset/src/com/google/cloud/asset/v1/SavedQueryName.java b/test/integration/goldens/asset/src/com/google/cloud/asset/v1/SavedQueryName.java index 41083dc1db..4cd6ab0d63 100644 --- a/test/integration/goldens/asset/src/com/google/cloud/asset/v1/SavedQueryName.java +++ b/test/integration/goldens/asset/src/com/google/cloud/asset/v1/SavedQueryName.java @@ -250,7 +250,7 @@ public boolean equals(Object o) { if (o == this) { return true; } - if (o != null || getClass() == o.getClass()) { + if (o != null && getClass() == o.getClass()) { SavedQueryName that = ((SavedQueryName) o); return Objects.equals(this.project, that.project) && Objects.equals(this.savedQuery, that.savedQuery) diff --git a/test/integration/goldens/bigtable/src/com/google/bigtable/v2/InstanceName.java b/test/integration/goldens/bigtable/src/com/google/bigtable/v2/InstanceName.java index 00f4c71710..7cf6525b1c 100644 --- a/test/integration/goldens/bigtable/src/com/google/bigtable/v2/InstanceName.java +++ b/test/integration/goldens/bigtable/src/com/google/bigtable/v2/InstanceName.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()) { InstanceName that = ((InstanceName) o); return Objects.equals(this.project, that.project) && Objects.equals(this.instance, that.instance); diff --git a/test/integration/goldens/bigtable/src/com/google/bigtable/v2/TableName.java b/test/integration/goldens/bigtable/src/com/google/bigtable/v2/TableName.java index 5e9a778ba4..b154274117 100644 --- a/test/integration/goldens/bigtable/src/com/google/bigtable/v2/TableName.java +++ b/test/integration/goldens/bigtable/src/com/google/bigtable/v2/TableName.java @@ -154,7 +154,7 @@ public boolean equals(Object o) { if (o == this) { return true; } - if (o != null || getClass() == o.getClass()) { + if (o != null && getClass() == o.getClass()) { TableName that = ((TableName) o); return Objects.equals(this.project, that.project) && Objects.equals(this.instance, that.instance) diff --git a/test/integration/goldens/credentials/src/com/google/cloud/iam/credentials/v1/ServiceAccountName.java b/test/integration/goldens/credentials/src/com/google/cloud/iam/credentials/v1/ServiceAccountName.java index 9d69721a97..7b036f599f 100644 --- a/test/integration/goldens/credentials/src/com/google/cloud/iam/credentials/v1/ServiceAccountName.java +++ b/test/integration/goldens/credentials/src/com/google/cloud/iam/credentials/v1/ServiceAccountName.java @@ -138,7 +138,7 @@ public boolean equals(Object o) { if (o == this) { return true; } - if (o != null || getClass() == o.getClass()) { + if (o != null && getClass() == o.getClass()) { ServiceAccountName that = ((ServiceAccountName) o); return Objects.equals(this.project, that.project) && Objects.equals(this.serviceAccount, that.serviceAccount); diff --git a/test/integration/goldens/kms/src/com/google/cloud/kms/v1/CryptoKeyName.java b/test/integration/goldens/kms/src/com/google/cloud/kms/v1/CryptoKeyName.java index da3fd1ed73..ac727082cb 100644 --- a/test/integration/goldens/kms/src/com/google/cloud/kms/v1/CryptoKeyName.java +++ b/test/integration/goldens/kms/src/com/google/cloud/kms/v1/CryptoKeyName.java @@ -175,7 +175,7 @@ public boolean equals(Object o) { if (o == this) { return true; } - if (o != null || getClass() == o.getClass()) { + if (o != null && getClass() == o.getClass()) { CryptoKeyName that = ((CryptoKeyName) o); return Objects.equals(this.project, that.project) && Objects.equals(this.location, that.location) diff --git a/test/integration/goldens/kms/src/com/google/cloud/kms/v1/CryptoKeyVersionName.java b/test/integration/goldens/kms/src/com/google/cloud/kms/v1/CryptoKeyVersionName.java index 50f3931496..b8672b6f1b 100644 --- a/test/integration/goldens/kms/src/com/google/cloud/kms/v1/CryptoKeyVersionName.java +++ b/test/integration/goldens/kms/src/com/google/cloud/kms/v1/CryptoKeyVersionName.java @@ -198,7 +198,7 @@ public boolean equals(Object o) { if (o == this) { return true; } - if (o != null || getClass() == o.getClass()) { + if (o != null && getClass() == o.getClass()) { CryptoKeyVersionName that = ((CryptoKeyVersionName) o); return Objects.equals(this.project, that.project) && Objects.equals(this.location, that.location) diff --git a/test/integration/goldens/kms/src/com/google/cloud/kms/v1/ImportJobName.java b/test/integration/goldens/kms/src/com/google/cloud/kms/v1/ImportJobName.java index 9d765f7a21..363ea81a8b 100644 --- a/test/integration/goldens/kms/src/com/google/cloud/kms/v1/ImportJobName.java +++ b/test/integration/goldens/kms/src/com/google/cloud/kms/v1/ImportJobName.java @@ -175,7 +175,7 @@ public boolean equals(Object o) { if (o == this) { return true; } - if (o != null || getClass() == o.getClass()) { + if (o != null && getClass() == o.getClass()) { ImportJobName that = ((ImportJobName) o); return Objects.equals(this.project, that.project) && Objects.equals(this.location, that.location) diff --git a/test/integration/goldens/kms/src/com/google/cloud/kms/v1/KeyRingName.java b/test/integration/goldens/kms/src/com/google/cloud/kms/v1/KeyRingName.java index 1849240828..38996aff7c 100644 --- a/test/integration/goldens/kms/src/com/google/cloud/kms/v1/KeyRingName.java +++ b/test/integration/goldens/kms/src/com/google/cloud/kms/v1/KeyRingName.java @@ -154,7 +154,7 @@ public boolean equals(Object o) { if (o == this) { return true; } - if (o != null || getClass() == o.getClass()) { + if (o != null && getClass() == o.getClass()) { KeyRingName that = ((KeyRingName) o); return Objects.equals(this.project, that.project) && Objects.equals(this.location, that.location) diff --git a/test/integration/goldens/kms/src/com/google/cloud/kms/v1/LocationName.java b/test/integration/goldens/kms/src/com/google/cloud/kms/v1/LocationName.java index 51a7d94ecf..999aff636a 100644 --- a/test/integration/goldens/kms/src/com/google/cloud/kms/v1/LocationName.java +++ b/test/integration/goldens/kms/src/com/google/cloud/kms/v1/LocationName.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()) { LocationName that = ((LocationName) o); return Objects.equals(this.project, that.project) && Objects.equals(this.location, that.location); diff --git a/test/integration/goldens/library/src/com/google/example/library/v1/BookName.java b/test/integration/goldens/library/src/com/google/example/library/v1/BookName.java index ff077c1bb0..3cc28fb4ba 100644 --- a/test/integration/goldens/library/src/com/google/example/library/v1/BookName.java +++ b/test/integration/goldens/library/src/com/google/example/library/v1/BookName.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()) { BookName that = ((BookName) o); return Objects.equals(this.shelf, that.shelf) && Objects.equals(this.book, that.book); } diff --git a/test/integration/goldens/library/src/com/google/example/library/v1/ShelfName.java b/test/integration/goldens/library/src/com/google/example/library/v1/ShelfName.java index e2005f9d72..92b9a4a996 100644 --- a/test/integration/goldens/library/src/com/google/example/library/v1/ShelfName.java +++ b/test/integration/goldens/library/src/com/google/example/library/v1/ShelfName.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()) { ShelfName that = ((ShelfName) o); return Objects.equals(this.shelfId, that.shelfId); } diff --git a/test/integration/goldens/logging/src/com/google/logging/v2/BillingAccountLocationName.java b/test/integration/goldens/logging/src/com/google/logging/v2/BillingAccountLocationName.java index 46ae7bf301..4a9812183f 100644 --- a/test/integration/goldens/logging/src/com/google/logging/v2/BillingAccountLocationName.java +++ b/test/integration/goldens/logging/src/com/google/logging/v2/BillingAccountLocationName.java @@ -140,7 +140,7 @@ public boolean equals(Object o) { if (o == this) { return true; } - if (o != null || getClass() == o.getClass()) { + if (o != null && getClass() == o.getClass()) { BillingAccountLocationName that = ((BillingAccountLocationName) o); return Objects.equals(this.billingAccount, that.billingAccount) && Objects.equals(this.location, that.location); diff --git a/test/integration/goldens/logging/src/com/google/logging/v2/BillingAccountName.java b/test/integration/goldens/logging/src/com/google/logging/v2/BillingAccountName.java index e4b122f5d9..c2f0cd358e 100644 --- a/test/integration/goldens/logging/src/com/google/logging/v2/BillingAccountName.java +++ b/test/integration/goldens/logging/src/com/google/logging/v2/BillingAccountName.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()) { BillingAccountName that = ((BillingAccountName) o); return Objects.equals(this.billingAccount, that.billingAccount); } diff --git a/test/integration/goldens/logging/src/com/google/logging/v2/CmekSettingsName.java b/test/integration/goldens/logging/src/com/google/logging/v2/CmekSettingsName.java index 07f8ccd3f1..09a410fb9b 100644 --- a/test/integration/goldens/logging/src/com/google/logging/v2/CmekSettingsName.java +++ b/test/integration/goldens/logging/src/com/google/logging/v2/CmekSettingsName.java @@ -265,7 +265,7 @@ public boolean equals(Object o) { if (o == this) { return true; } - if (o != null || getClass() == o.getClass()) { + if (o != null && getClass() == o.getClass()) { CmekSettingsName that = ((CmekSettingsName) o); return Objects.equals(this.project, that.project) && Objects.equals(this.organization, that.organization) diff --git a/test/integration/goldens/logging/src/com/google/logging/v2/FolderLocationName.java b/test/integration/goldens/logging/src/com/google/logging/v2/FolderLocationName.java index 9e43349977..f49c5ae452 100644 --- a/test/integration/goldens/logging/src/com/google/logging/v2/FolderLocationName.java +++ b/test/integration/goldens/logging/src/com/google/logging/v2/FolderLocationName.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()) { FolderLocationName that = ((FolderLocationName) o); return Objects.equals(this.folder, that.folder) && Objects.equals(this.location, that.location); diff --git a/test/integration/goldens/logging/src/com/google/logging/v2/FolderName.java b/test/integration/goldens/logging/src/com/google/logging/v2/FolderName.java index 14b45b12f9..52946796ee 100644 --- a/test/integration/goldens/logging/src/com/google/logging/v2/FolderName.java +++ b/test/integration/goldens/logging/src/com/google/logging/v2/FolderName.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()) { FolderName that = ((FolderName) o); return Objects.equals(this.folder, that.folder); } diff --git a/test/integration/goldens/logging/src/com/google/logging/v2/LocationName.java b/test/integration/goldens/logging/src/com/google/logging/v2/LocationName.java index 41db5c824e..d35fa539b9 100644 --- a/test/integration/goldens/logging/src/com/google/logging/v2/LocationName.java +++ b/test/integration/goldens/logging/src/com/google/logging/v2/LocationName.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()) { LocationName that = ((LocationName) o); return Objects.equals(this.project, that.project) && Objects.equals(this.location, that.location); diff --git a/test/integration/goldens/logging/src/com/google/logging/v2/LogBucketName.java b/test/integration/goldens/logging/src/com/google/logging/v2/LogBucketName.java index f3ab7fa011..416ff0a60e 100644 --- a/test/integration/goldens/logging/src/com/google/logging/v2/LogBucketName.java +++ b/test/integration/goldens/logging/src/com/google/logging/v2/LogBucketName.java @@ -344,7 +344,7 @@ public boolean equals(Object o) { if (o == this) { return true; } - if (o != null || getClass() == o.getClass()) { + if (o != null && getClass() == o.getClass()) { LogBucketName that = ((LogBucketName) o); return Objects.equals(this.project, that.project) && Objects.equals(this.location, that.location) diff --git a/test/integration/goldens/logging/src/com/google/logging/v2/LogExclusionName.java b/test/integration/goldens/logging/src/com/google/logging/v2/LogExclusionName.java index b87f1b4c38..b92fb9c128 100644 --- a/test/integration/goldens/logging/src/com/google/logging/v2/LogExclusionName.java +++ b/test/integration/goldens/logging/src/com/google/logging/v2/LogExclusionName.java @@ -296,7 +296,7 @@ public boolean equals(Object o) { if (o == this) { return true; } - if (o != null || getClass() == o.getClass()) { + if (o != null && getClass() == o.getClass()) { LogExclusionName that = ((LogExclusionName) o); return Objects.equals(this.project, that.project) && Objects.equals(this.exclusion, that.exclusion) diff --git a/test/integration/goldens/logging/src/com/google/logging/v2/LogMetricName.java b/test/integration/goldens/logging/src/com/google/logging/v2/LogMetricName.java index 1b8efcb5b6..88602294ce 100644 --- a/test/integration/goldens/logging/src/com/google/logging/v2/LogMetricName.java +++ b/test/integration/goldens/logging/src/com/google/logging/v2/LogMetricName.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()) { LogMetricName that = ((LogMetricName) o); return Objects.equals(this.project, that.project) && Objects.equals(this.metric, that.metric); } diff --git a/test/integration/goldens/logging/src/com/google/logging/v2/LogName.java b/test/integration/goldens/logging/src/com/google/logging/v2/LogName.java index 4269202edf..d62ef78762 100644 --- a/test/integration/goldens/logging/src/com/google/logging/v2/LogName.java +++ b/test/integration/goldens/logging/src/com/google/logging/v2/LogName.java @@ -282,7 +282,7 @@ public boolean equals(Object o) { if (o == this) { return true; } - if (o != null || getClass() == o.getClass()) { + if (o != null && getClass() == o.getClass()) { LogName that = ((LogName) o); return Objects.equals(this.project, that.project) && Objects.equals(this.log, that.log) diff --git a/test/integration/goldens/logging/src/com/google/logging/v2/LogSinkName.java b/test/integration/goldens/logging/src/com/google/logging/v2/LogSinkName.java index 6ac04c85ac..63db5f8ac6 100644 --- a/test/integration/goldens/logging/src/com/google/logging/v2/LogSinkName.java +++ b/test/integration/goldens/logging/src/com/google/logging/v2/LogSinkName.java @@ -286,7 +286,7 @@ public boolean equals(Object o) { if (o == this) { return true; } - if (o != null || getClass() == o.getClass()) { + if (o != null && getClass() == o.getClass()) { LogSinkName that = ((LogSinkName) o); return Objects.equals(this.project, that.project) && Objects.equals(this.sink, that.sink) diff --git a/test/integration/goldens/logging/src/com/google/logging/v2/LogViewName.java b/test/integration/goldens/logging/src/com/google/logging/v2/LogViewName.java index 2822f2e4ee..223dcf90ec 100644 --- a/test/integration/goldens/logging/src/com/google/logging/v2/LogViewName.java +++ b/test/integration/goldens/logging/src/com/google/logging/v2/LogViewName.java @@ -388,7 +388,7 @@ public boolean equals(Object o) { if (o == this) { return true; } - if (o != null || getClass() == o.getClass()) { + if (o != null && getClass() == o.getClass()) { LogViewName that = ((LogViewName) o); return Objects.equals(this.project, that.project) && Objects.equals(this.location, that.location) diff --git a/test/integration/goldens/logging/src/com/google/logging/v2/OrganizationLocationName.java b/test/integration/goldens/logging/src/com/google/logging/v2/OrganizationLocationName.java index 91a70bc9ee..782996120c 100644 --- a/test/integration/goldens/logging/src/com/google/logging/v2/OrganizationLocationName.java +++ b/test/integration/goldens/logging/src/com/google/logging/v2/OrganizationLocationName.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()) { OrganizationLocationName that = ((OrganizationLocationName) o); return Objects.equals(this.organization, that.organization) && Objects.equals(this.location, that.location); diff --git a/test/integration/goldens/logging/src/com/google/logging/v2/OrganizationName.java b/test/integration/goldens/logging/src/com/google/logging/v2/OrganizationName.java index e4f8b5921b..e2021c38b6 100644 --- a/test/integration/goldens/logging/src/com/google/logging/v2/OrganizationName.java +++ b/test/integration/goldens/logging/src/com/google/logging/v2/OrganizationName.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()) { OrganizationName that = ((OrganizationName) o); return Objects.equals(this.organization, that.organization); } diff --git a/test/integration/goldens/logging/src/com/google/logging/v2/ProjectName.java b/test/integration/goldens/logging/src/com/google/logging/v2/ProjectName.java index b2396890c5..718dc26f69 100644 --- a/test/integration/goldens/logging/src/com/google/logging/v2/ProjectName.java +++ b/test/integration/goldens/logging/src/com/google/logging/v2/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/test/integration/goldens/logging/src/com/google/logging/v2/SettingsName.java b/test/integration/goldens/logging/src/com/google/logging/v2/SettingsName.java index ff30fb7876..40a59eee58 100644 --- a/test/integration/goldens/logging/src/com/google/logging/v2/SettingsName.java +++ b/test/integration/goldens/logging/src/com/google/logging/v2/SettingsName.java @@ -265,7 +265,7 @@ public boolean equals(Object o) { if (o == this) { return true; } - if (o != null || getClass() == o.getClass()) { + if (o != null && getClass() == o.getClass()) { SettingsName that = ((SettingsName) o); return Objects.equals(this.project, that.project) && Objects.equals(this.organization, that.organization) diff --git a/test/integration/goldens/pubsub/src/com/google/pubsub/v1/ProjectName.java b/test/integration/goldens/pubsub/src/com/google/pubsub/v1/ProjectName.java index 2db62c0e78..d04475ab05 100644 --- a/test/integration/goldens/pubsub/src/com/google/pubsub/v1/ProjectName.java +++ b/test/integration/goldens/pubsub/src/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/test/integration/goldens/pubsub/src/com/google/pubsub/v1/SchemaName.java b/test/integration/goldens/pubsub/src/com/google/pubsub/v1/SchemaName.java index 1b2c9a9087..2d8968ddf2 100644 --- a/test/integration/goldens/pubsub/src/com/google/pubsub/v1/SchemaName.java +++ b/test/integration/goldens/pubsub/src/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/test/integration/goldens/pubsub/src/com/google/pubsub/v1/SnapshotName.java b/test/integration/goldens/pubsub/src/com/google/pubsub/v1/SnapshotName.java index 2aba349b38..4642f23233 100644 --- a/test/integration/goldens/pubsub/src/com/google/pubsub/v1/SnapshotName.java +++ b/test/integration/goldens/pubsub/src/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/test/integration/goldens/pubsub/src/com/google/pubsub/v1/SubscriptionName.java b/test/integration/goldens/pubsub/src/com/google/pubsub/v1/SubscriptionName.java index 8ed44f6143..ad49b90ddd 100644 --- a/test/integration/goldens/pubsub/src/com/google/pubsub/v1/SubscriptionName.java +++ b/test/integration/goldens/pubsub/src/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/test/integration/goldens/pubsub/src/com/google/pubsub/v1/TopicName.java b/test/integration/goldens/pubsub/src/com/google/pubsub/v1/TopicName.java index 8af73d814c..6fc356a2bb 100644 --- a/test/integration/goldens/pubsub/src/com/google/pubsub/v1/TopicName.java +++ b/test/integration/goldens/pubsub/src/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); } diff --git a/test/integration/goldens/redis/src/com/google/cloud/redis/v1beta1/InstanceName.java b/test/integration/goldens/redis/src/com/google/cloud/redis/v1beta1/InstanceName.java index cc7cbdd8ef..149eaf7034 100644 --- a/test/integration/goldens/redis/src/com/google/cloud/redis/v1beta1/InstanceName.java +++ b/test/integration/goldens/redis/src/com/google/cloud/redis/v1beta1/InstanceName.java @@ -154,7 +154,7 @@ public boolean equals(Object o) { if (o == this) { return true; } - if (o != null || getClass() == o.getClass()) { + if (o != null && getClass() == o.getClass()) { InstanceName that = ((InstanceName) o); return Objects.equals(this.project, that.project) && Objects.equals(this.location, that.location) diff --git a/test/integration/goldens/redis/src/com/google/cloud/redis/v1beta1/LocationName.java b/test/integration/goldens/redis/src/com/google/cloud/redis/v1beta1/LocationName.java index cf80caf994..f5ea57d727 100644 --- a/test/integration/goldens/redis/src/com/google/cloud/redis/v1beta1/LocationName.java +++ b/test/integration/goldens/redis/src/com/google/cloud/redis/v1beta1/LocationName.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()) { LocationName that = ((LocationName) o); return Objects.equals(this.project, that.project) && Objects.equals(this.location, that.location); diff --git a/test/integration/goldens/storage/src/com/google/storage/v2/BucketName.java b/test/integration/goldens/storage/src/com/google/storage/v2/BucketName.java index 078819ae86..d2643c96d8 100644 --- a/test/integration/goldens/storage/src/com/google/storage/v2/BucketName.java +++ b/test/integration/goldens/storage/src/com/google/storage/v2/BucketName.java @@ -137,7 +137,7 @@ public boolean equals(java.lang.Object o) { if (o == this) { return true; } - if (o != null || getClass() == o.getClass()) { + if (o != null && getClass() == o.getClass()) { BucketName that = ((BucketName) o); return Objects.equals(this.project, that.project) && Objects.equals(this.bucket, that.bucket); } diff --git a/test/integration/goldens/storage/src/com/google/storage/v2/CryptoKeyName.java b/test/integration/goldens/storage/src/com/google/storage/v2/CryptoKeyName.java index f80912dc89..a9d2ffd79b 100644 --- a/test/integration/goldens/storage/src/com/google/storage/v2/CryptoKeyName.java +++ b/test/integration/goldens/storage/src/com/google/storage/v2/CryptoKeyName.java @@ -175,7 +175,7 @@ public boolean equals(java.lang.Object o) { if (o == this) { return true; } - if (o != null || getClass() == o.getClass()) { + if (o != null && getClass() == o.getClass()) { CryptoKeyName that = ((CryptoKeyName) o); return Objects.equals(this.project, that.project) && Objects.equals(this.location, that.location) diff --git a/test/integration/goldens/storage/src/com/google/storage/v2/NotificationName.java b/test/integration/goldens/storage/src/com/google/storage/v2/NotificationName.java index faa9c9744d..692837f59f 100644 --- a/test/integration/goldens/storage/src/com/google/storage/v2/NotificationName.java +++ b/test/integration/goldens/storage/src/com/google/storage/v2/NotificationName.java @@ -154,7 +154,7 @@ public boolean equals(java.lang.Object o) { if (o == this) { return true; } - if (o != null || getClass() == o.getClass()) { + if (o != null && getClass() == o.getClass()) { NotificationName that = ((NotificationName) o); return Objects.equals(this.project, that.project) && Objects.equals(this.bucket, that.bucket) diff --git a/test/integration/goldens/storage/src/com/google/storage/v2/ProjectName.java b/test/integration/goldens/storage/src/com/google/storage/v2/ProjectName.java index 154bd94bf8..b8d7aa7b69 100644 --- a/test/integration/goldens/storage/src/com/google/storage/v2/ProjectName.java +++ b/test/integration/goldens/storage/src/com/google/storage/v2/ProjectName.java @@ -127,7 +127,7 @@ public boolean equals(java.lang.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); }