Description
STORM-2191 shortens the worker classpath by substituting in wildcards for the full list of jars. The path is constructed using Paths.get(dir, "*"), but this doesn't work on Windows. It seems like Windows checks that the path is valid.
Paths.get(new File(".").toString(), "*"); Exception in thread "main" java.nio.file.InvalidPathException: Illegal char <*> at index 2: .\* at sun.nio.fs.WindowsPathParser.normalize(WindowsPathParser.java:182) at sun.nio.fs.WindowsPathParser.parse(WindowsPathParser.java:153) at sun.nio.fs.WindowsPathParser.parse(WindowsPathParser.java:77) at sun.nio.fs.WindowsPath.parse(WindowsPath.java:94) at sun.nio.fs.WindowsFileSystem.getPath(WindowsFileSystem.java:255) at java.nio.file.Paths.get(Paths.java:84)
Paths doesn't guarantee support for globs, and we don't want the OS to examine the path in any case, since the wildcard isn't a "real" wildcard (including all files) but a special syntax for including jars in the Java classpath. The path should be constructed with String concatenation instead.
Attachments
Issue Links
- links to