diff --git a/server/src/main/java/io/unitycatalog/server/persist/utils/FileOperations.java b/server/src/main/java/io/unitycatalog/server/persist/utils/FileOperations.java index c8ffa225a8..c5312cef91 100644 --- a/server/src/main/java/io/unitycatalog/server/persist/utils/FileOperations.java +++ b/server/src/main/java/io/unitycatalog/server/persist/utils/FileOperations.java @@ -216,7 +216,7 @@ public static void assertValidLocation(String location) { * the input as a local file path and converts it to a "file://" URI. * * @param inputPath the input path or URI to be standardized. - * @return the standardized URI string. + * @return the standardized URI string, or null if inputPath is null. * @throws BaseException if the input path has an unsupported URI scheme. *
Examples of input and output: *
@@ -241,6 +241,9 @@ public static void assertValidLocation(String location) {
*
*/
public static String toStandardizedURIString(String inputPath) {
+ if (inputPath == null) {
+ return null;
+ }
// Check if the path is already a URI with a valid scheme
URI uri;
try {