szetszwo commented on code in PR #5505:
URL: https://github.com/apache/hadoop/pull/5505#discussion_r1147106437
##########
hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/web/WebHdfsFileSystem.java:
##########
@@ -2207,10 +2206,8 @@ public boolean hasPathCapability(final Path path, final
String capability)
throws IOException {
// qualify the path to make sure that it refers to the current FS.
final Path p = makeQualified(path);
- Optional<Boolean> cap = DfsPathCapabilities.hasPathCapability(p,
- capability);
- if (cap.isPresent()) {
- return cap.get();
+ if (DfsPathCapabilities.hasPathCapability(p, capability)) {
Review Comment:
@saxenapranav , we cannot fix a potential "future" problem. Since there is
a unit test, such future change will be detected by the test. At that time, we
may think about how to solve the problem such as adding the enum.
--
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]