sodonnel commented on code in PR #5691:
URL: https://github.com/apache/ozone/pull/5691#discussion_r1409554997


##########
hadoop-hdds/common/src/main/java/org/apache/hadoop/hdds/scm/net/NetworkTopologyImpl.java:
##########
@@ -136,7 +137,7 @@ public void add(Node node) {
   @Override
   public void update(Node oldNode, Node newNode) {
     Preconditions.checkArgument(newNode != null, "newNode cannot be null");
-    if (oldNode != null && oldNode instanceof InnerNode) {
+    if (oldNode instanceof InnerNode) {

Review Comment:
   Nice, I did not know you could avoid a null check here:
   
   
https://stackoverflow.com/questions/2950319/is-null-check-needed-before-calling-instanceof



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