hackergin commented on code in PR #25754:
URL: https://github.com/apache/flink/pull/25754#discussion_r1904831819


##########
flink-table/flink-sql-client/src/main/java/org/apache/flink/table/client/cli/CliOptionsParser.java:
##########
@@ -308,32 +309,30 @@ private static URL parseGatewayAddress(String 
cliOptionAddress) {
 
     // 
--------------------------------------------------------------------------------------------
 
-    private static URL checkUrl(CommandLine line, Option option) {
-        final List<URL> urls = checkUrls(line, option);
-        if (urls != null && !urls.isEmpty()) {
-            return urls.get(0);
+    private static @Nullable URI parseURI(CommandLine line, Option option) {
+        List<URI> uris = parseURIs(line, option);
+        if (uris == null || uris.isEmpty()) {
+            return null;
+        } else {
+            return uris.get(0);
         }
-        return null;
     }
 
-    private static List<URL> checkUrls(CommandLine line, Option option) {
+    private static @Nullable List<URI> parseURIs(CommandLine line, Option 
option) {
         if (line.hasOption(option.getOpt())) {
-            final String[] urls = line.getOptionValues(option.getOpt());
-            return Arrays.stream(urls)
+            final String[] uris = line.getOptionValues(option.getOpt());
+            return Arrays.stream(uris)
                     .distinct()
                     .map(
-                            (url) -> {
-                                checkFilePath(url);
+                            uri -> {
                                 try {
-                                    return Path.fromLocalFile(new 
File(url).getAbsoluteFile())
-                                            .toUri()
-                                            .toURL();
+                                    return URI.create(uri);
                                 } catch (Exception e) {
                                     throw new SqlClientException(
                                             "Invalid path for option '"

Review Comment:
   Invalid uri for option ? 



-- 
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]

Reply via email to