Community
Participate
Working Groups
When having a URL like file:////WSL$/... java.net.URI.getPath() will return /WSL$/.... When passing this to java.net.URI() as path-parameter, the first element is not interpreted as path, but as Authority, which does not support the $ (see backtrace)(IMO this is a bug in the java-lib). While this problem occurred using the Winows-WSL, this can occur with any root-path containing special characters (-at least if I did not miss anything). java.lang.RuntimeException: java.net.URISyntaxException: Illegal character in hostname at index 10: file://WSL$/Ubuntu/home/[..] at org.eclipse.core.runtime.URIUtil.append(URIUtil.java:85) at org.eclipse.cdt.core.EFSExtensionProvider.append(EFSExtensionProvider.java:166) at org.eclipse.cdt.utils.EFSExtensionManager.append(EFSExtensionManager.java:216) at org.eclipse.cdt.core.ErrorParserManager.toURI(ErrorParserManager.java:758) at org.eclipse.cdt.core.ErrorParserManager.findFileInWorkspace(ErrorParserManager.java:498) [..] Caused by: java.net.URISyntaxException: Illegal character in hostname at index 10: file://WSL$/Ubuntu/home/morty/[..] at java.base/java.net.URI$Parser.fail(URI.java:2963) at java.base/java.net.URI$Parser.parseHostname(URI.java:3498) at java.base/java.net.URI$Parser.parseServer(URI.java:3347) at java.base/java.net.URI$Parser.parseAuthority(URI.java:3266) at java.base/java.net.URI$Parser.parseHierarchical(URI.java:3208) at java.base/java.net.URI$Parser.parse(URI.java:3164) at java.base/java.net.URI.<init>(URI.java:708) at org.eclipse.core.runtime.URIUtil.append(URIUtil.java:75)
This seems related to https://bugs.eclipse.org/bugs/show_bug.cgi?id=207103