slfan1989 commented on code in PR #5096:
URL: https://github.com/apache/hadoop/pull/5096#discussion_r1012377646


##########
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-common/src/main/java/org/apache/hadoop/yarn/server/federation/store/records/ReservationHomeSubCluster.java:
##########
@@ -94,20 +94,20 @@ public static ReservationHomeSubCluster 
newInstance(ReservationId resId,
 
   @Override
   public boolean equals(Object obj) {
+
     if (this == obj) {
       return true;
     }
-    if (obj == null) {
-      return false;
-    }
-    if (getClass() != obj.getClass()) {
+
+    if (obj == null || getClass() != obj.getClass()) {
       return false;
     }
-    ReservationHomeSubCluster other = (ReservationHomeSubCluster) obj;
+
+    ReservationHomeSubCluster right = (ReservationHomeSubCluster) obj;
 
     return new EqualsBuilder()
-        .append(this.getReservationId(), other.getReservationId())
-        .append(this.getHomeSubCluster(), other.getHomeSubCluster())
+        .append(this.getReservationId(), right.getReservationId())

Review Comment:
   I will fix it



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

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to