xiaoyuyao commented on a change in pull request #1044:
URL: https://github.com/apache/hadoop-ozone/pull/1044#discussion_r439149023
##########
File path:
hadoop-hdds/common/src/main/java/org/apache/hadoop/hdds/scm/net/NetUtils.java
##########
@@ -59,9 +64,12 @@ public static String normalize(String path) {
+ NetConstants.PATH_SEPARATOR_STR + ": " + path);
}
+ if (len == 1 || path.charAt(len - 1) != NetConstants.PATH_SEPARATOR) {
Review comment:
Can we simplified the logic without any matcher by using apache common
StringUtils?
return len == 1 ? path : StringUtils.removeEnd(path, "/");
----------------------------------------------------------------
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]