[ 
https://issues.apache.org/jira/browse/GEODE-9523?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17403267#comment-17403267
 ] 

ASF subversion and git services commented on GEODE-9523:
--------------------------------------------------------

Commit 2752849e28711f27fdc41556984358583b5fc012 in geode's branch 
refs/heads/expireAuthentication from Dale Emery
[ https://gitbox.apache.org/repos/asf?p=geode.git;h=2752849 ]

GEODE-9523: Fix invalid path in ContainerInstall (#6774)

PROBLEM

`ContainerInstall` fetches a resource URL, then applies a chain of
conversions before passing the resulting URL to the `ZipURLInstaller`
constructor.  One of the conversions attempts to create a `Path` from a
string.  On Windows, the string value is not a valid path, and
`Paths.get(...)` throws an exception.

SOLUTION

Change `ContainerInstall` to remove all of the conversions. The original
resource URL is acceptable to `ZipURLInstaller` without any conversion.

> ContainerInstall Resource path invalid on Windows
> -------------------------------------------------
>
>                 Key: GEODE-9523
>                 URL: https://issues.apache.org/jira/browse/GEODE-9523
>             Project: Geode
>          Issue Type: Test
>          Components: tests
>            Reporter: Dale Emery
>            Assignee: Dale Emery
>            Priority: Major
>              Labels: GeodeOperationAPI, pull-request-available
>             Fix For: 1.15.0
>
>
> The {{ContainerInstall}} test helper creates an installer using this code:
> {noformat}
> String resource = getResource(getClass(), "/" + downloadURL).getPath();
> URL url = Paths.get(resource).toUri().toURL();
> Installer installer = new ZipURLInstaller(url, TMP_DIR + "/downloads", 
> installDir);
> {noformat}
> On Windows, the {{resource}} string is not a valid {{Path}}, and the second 
> line throws an exception:
> _java.nio.file.InvalidPathException: Illegal char <:> at index 2: 
> /C:/Users/geode/geode/geode-assembly/build/resources/distributedTest/tomcat-9.0.48.zip_
> The chain of conversions is unnecessary. On Windows, the URL returned from 
> {{getResource(...)}} is a perfectly fine URL to pass to the 
> {{ZipURLInstaller}}.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to