RFR: 8273961: jdk/nio/zipfs/ZipFSTester.java fails if file path contains '+' character [v2]
Christoph Langer
clanger at openjdk.java.net
Tue Sep 21 08:21:45 UTC 2021
On Tue, 21 Sep 2021 05:42:11 GMT, Remilia Scarlet <github.com+22913521+1996scarlet at openjdk.org> wrote:
>> Add the pre-processing to replace "+" by "%2b" which avoids `URLDecoder.decoder` changing the path unexpectedly.
>>
>> Please review this change. Thanks!
>
> Remilia Scarlet has refreshed the contents of this pull request, and previous commits have been removed. The incremental views will show differences compared to the previous content of the PR.
Changes requested by clanger (Reviewer).
test/jdk/jdk/nio/zipfs/ZipFSTester.java line 704:
> 702: // character
> 703: return FileSystems.newFileSystem(
> 704: new URI("jar", URLDecoder.decode(encoded, "utf8"),
instead of using local variable encoded, I would just add the call to .replace("+", "%2b") inline.
The comments look good, I would suggest to put them between line 702/703.
-------------
PR: https://git.openjdk.java.net/jdk/pull/5574
More information about the nio-dev
mailing list