Fokko commented on a change in pull request #611: Fix EqualsGetClass error
URL: https://github.com/apache/incubator-iceberg/pull/611#discussion_r343295327
##########
File path: api/src/main/java/org/apache/iceberg/PartitionField.java
##########
@@ -67,8 +67,7 @@ public String toString() {
public boolean equals(Object other) {
if (this == other) {
return true;
- }
- if (other == null || getClass() != other.getClass()) {
+ } else if (!(other instanceof PartitionField)) {
Review comment:
Normally I would agree with you, but in both statements, there is a return.
So it isn't possible to enter both `if` statements and `else if` makes more
sense to me then.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]