You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@calcite.apache.org by GitBox <gi...@apache.org> on 2020/03/31 07:46:29 UTC

[GitHub] [calcite] vlsi commented on a change in pull request #1800: [CALCITE-3790] Make the URL of FileSource available

vlsi commented on a change in pull request #1800: [CALCITE-3790] Make the URL of FileSource available
URL: https://github.com/apache/calcite/pull/1800#discussion_r400707254
 
 

 ##########
 File path: core/src/main/java/org/apache/calcite/util/Sources.java
 ##########
 @@ -189,14 +196,25 @@ private static File urlToFile(URL url) {
       return Paths.get(uri).toFile();
     }
 
+    private static URL fileToUrl(File file) {
+      URI uri;
+      try {
+        uri = file.toURI();
+      } catch (SecurityException e) {
+        throw new IllegalArgumentException("No access to the underlying file " + file.getPath());
 
 Review comment:
   Why do you omit `SecurityException e` in the caused by chain?

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services