echonesis commented on code in PR #11108:
URL: https://github.com/apache/ozone/pull/11108#discussion_r3886325107
##########
hadoop-ozone/ozonefs-common/src/main/java/org/apache/hadoop/fs/ozone/BasicOzoneFileSystem.java:
##########
@@ -153,6 +156,10 @@ public void initialize(URI name, Configuration conf)
throws IOException {
throw new IllegalArgumentException(URI_EXCEPTION_TEXT);
}
+ if (authority.indexOf(':') != authority.lastIndexOf(':')) {
Review Comment:
Good catch. InetAddresses.isInetAddress works here as well. I’ll restrict
the OFS bracket-specific error to authorities that are actually valid
unbracketed IPv6 literals. Malformed multi-colon authorities such as
`ofs://host:123:456/` will then fall through to HostAndPort validation and
receive the general URI-format error. I’ll add a regression test for that case.
--
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]