StephanEwen commented on issue #8040: [FLINK-11155][fs][hadoop] Fix hadoop-free 
factory tests on Java 9 
URL: https://github.com/apache/flink/pull/8040#issuecomment-477224212
 
 
   Looks correct, but it would be nice to solve this without another library.
   
   This should work as well:
   ```
   private static URL[] getClasspathURLs() {
        final String[] cp = 
System.getProperty("java.class.path").split(File.pathSeparator);
   
        return Arrays.stream(cp)
                .filter(str -> !str.isEmpty())
                .map(HadoopFreeFsFactoryTest::parse)
                .toArray(URL[]::new);
   }
   
   private static URL parse(String fileName) {
        try {
                return new File(fileName).toURI().toURL();
        } catch (MalformedURLException e) {
                throw new RuntimeException(e);
        }
   }
   ```

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

Reply via email to