ajantha-bhat commented on code in PR #12389: URL: https://github.com/apache/iceberg/pull/12389#discussion_r1966767782
########## core/src/main/java/org/apache/iceberg/rest/HTTPRequest.java: ########## @@ -53,13 +53,16 @@ enum HTTPMethod { */ @Value.Lazy default URI requestUri() { - // if full path is provided, use the input path as path - String fullPath = - (path().startsWith("https://") || path().startsWith("http://")) - ? path() - : String.format("%s/%s", baseUri(), path()); + // if path is an absolute URI, use it as is Review Comment: nit: Please move the comment inside the if block. ########## core/src/main/java/org/apache/iceberg/rest/HTTPRequest.java: ########## @@ -53,13 +53,16 @@ enum HTTPMethod { */ @Value.Lazy default URI requestUri() { - // if full path is provided, use the input path as path - String fullPath = - (path().startsWith("https://") || path().startsWith("http://")) - ? path() - : String.format("%s/%s", baseUri(), path()); + // if path is an absolute URI, use it as is + String fullPath; + if (path().startsWith("https://") || path().startsWith("http://")) { + fullPath = path(); + } else { + String baseUri = RESTUtil.stripTrailingSlash(baseUri().toString()); + fullPath = RESTUtil.stripTrailingSlash(String.format("%s/%s", baseUri, path())); + } Review Comment: nit: Iceberg uses a newline separator after control block. So, please add a new line here. -- 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: issues-unsubscr...@iceberg.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org For additional commands, e-mail: issues-h...@iceberg.apache.org