rdblue commented on a change in pull request #153: [Baseline] Apply baseline 
linting to iceberg-core
URL: https://github.com/apache/incubator-iceberg/pull/153#discussion_r276762142
 
 

 ##########
 File path: core/src/main/java/org/apache/iceberg/util/StructLikeWrapper.java
 ##########
 @@ -53,13 +54,12 @@ public boolean equals(Object other) {
 
     StructLikeWrapper that = (StructLikeWrapper) other;
 
-    if (this.struct == null) {
-      if (that.struct == null) {
-        return true;
-      } else {
-        return false;
-      }
-    } else if (that.struct == null) {
+    // Reference equality also checks for null
+    if (this.struct == that.struct) {
+      return true;
+    }
+
+    if (that.struct == null) {
 
 Review comment:
   What if `this.struct` is null?

----------------------------------------------------------------
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]

Reply via email to