RFR: 8231431 - JAOTC issues with JAR path containing spaces

Vladimir Kozlov vladimir.kozlov at oracle.com
Thu Sep 26 21:45:45 UTC 2019


Nice.

Thanks,
Vladimir

On 9/26/19 2:17 PM, Bob Vandette wrote:
> Please review this simple fix for creating a jaotc library from jar files that are contained in
> directories with spaces in their name.
> 
> The fix was verified on Linux and Windows.
> 
> BUG:
> 
> https://bugs.openjdk.java.net/browse/JDK-8231431
> 
> FIX:
> 
> diff --git a/src/jdk.aot/share/classes/jdk.tools.jaotc/src/jdk/tools/jaotc/collect/FileSupport.java b/src/jdk.aot/share/classes/jdk.tools.jaotc/src/jdk/tools/jaotc/collect/FileSupport.java
> --- a/src/jdk.aot/share/classes/jdk.tools.jaotc/src/jdk/tools/jaotc/collect/FileSupport.java
> +++ b/src/jdk.aot/share/classes/jdk.tools.jaotc/src/jdk/tools/jaotc/collect/FileSupport.java
> @@ -59,6 +59,7 @@
>           try {
>               String name = path.toAbsolutePath().toString();
>               name = name.replace('\\', '/');
> +            name = name.replaceAll(" ", "%20");
>               return new URI("jar:file:///" + name + "!/");
>           } catch (URISyntaxException e) {
>               throw new InternalError(e);
> 
> Bob.
> 


More information about the hotspot-compiler-dev mailing list