You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-issues@hadoop.apache.org by GitBox <gi...@apache.org> on 2022/08/01 17:48:08 UTC
[GitHub] [hadoop] goiri commented on a diff in pull request #4668: HDFS-16695. Improve code with Lambda in org.apache.hadoop.hdfs.servernamenode package
goiri commented on code in PR #4668:
URL: https://github.com/apache/hadoop/pull/4668#discussion_r934771841
##########
hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/EncryptionZoneManager.java:
##########
@@ -636,10 +636,7 @@ private boolean pathResolvesToId(final long zoneId, final String zonePath)
INodesInPath iip = dir.getINodesInPath(zonePath, DirOp.READ_LINK);
lastINode = iip.getLastINode();
}
- if (lastINode == null || lastINode.getId() != zoneId) {
- return false;
- }
- return true;
+ return lastINode != null && lastINode.getId() == zoneId;
Review Comment:
I'm not sure this is more readable than what we had.
--
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: common-issues-unsubscribe@hadoop.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-issues-help@hadoop.apache.org