qiuyanjun888 commented on code in PR #28529:
URL: https://github.com/apache/flink/pull/28529#discussion_r3471844562


##########
flink-table/flink-sql-gateway/src/main/java/org/apache/flink/table/gateway/service/context/SessionContext.java:
##########
@@ -318,6 +320,21 @@ public static SessionContext create(
                 new OperationManager(operationExecutorService));
     }
 
+    private static URL[] getDependencyURLs(DefaultContext defaultContext) {
+        return defaultContext.getDependencies().stream()
+                .map(SessionContext::toURL)
+                .toArray(URL[]::new);
+    }
+
+    private static URL toURL(URI uri) {
+        try {
+            return uri.toURL();
+        } catch (MalformedURLException e) {

Review Comment:
   Fixed by catching `IllegalArgumentException` alongside 
`MalformedURLException` and wrapping it in `SqlGatewayException`; added a 
regression test for `URI.create("foo.jar")`.
   
   Verification: `./mvnw -pl flink-table/flink-sql-gateway 
-Dtest=SessionContextTest test -DfailIfNoTests=false` passed, and `git diff 
--check` passed.



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