dimas-b commented on code in PR #1604:
URL: https://github.com/apache/polaris/pull/1604#discussion_r2096484269


##########
polaris-core/src/main/java/org/apache/polaris/core/storage/StorageLocation.java:
##########
@@ -44,8 +44,10 @@ protected StorageLocation(@Nonnull String location) {
       this.location = URI.create(location.replaceFirst("file:/+", 
LOCAL_PATH_PREFIX)).toString();
     } else if (location.startsWith("/")) {
       this.location = URI.create(location.replaceFirst("/+", 
LOCAL_PATH_PREFIX)).toString();

Review Comment:
   Do we have tests for multiple leading `/` chars?



##########
polaris-core/src/main/java/org/apache/polaris/core/storage/StorageLocation.java:
##########
@@ -44,8 +44,10 @@ protected StorageLocation(@Nonnull String location) {
       this.location = URI.create(location.replaceFirst("file:/+", 
LOCAL_PATH_PREFIX)).toString();
     } else if (location.startsWith("/")) {
       this.location = URI.create(location.replaceFirst("/+", 
LOCAL_PATH_PREFIX)).toString();
-    } else {
+    } else if (location.startsWith(LOCAL_PATH_PREFIX)) {

Review Comment:
   What if location is `FILE:////////tmp/smth`?



-- 
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...@polaris.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to