On Tue, 8 Dec 2020 02:55:43 GMT, Athijegannathan Sundararajan 
<sun...@openjdk.org> wrote:

>> test/jdk/jdk/internal/jrtfs/Test8242258.java line 60:
>> 
>>> 58:             { "xyz ", "jrt:/xyz%20" },
>>> 59:             { "xy z", "jrt:/xy%20z" },
>>> 60:         };
>> 
>> One other thing we test here is a malformed escape pair, e.g. "jrt:/%5" and 
>> check that getPath(URI) throws IAE.
>
> URI.create(String) method itself checks for malformed escape pairs. Do we 
> need anything additional here?

The bug report is Path -> URI but any testing here has to do round-trip (as you 
have done). My comment about the malformed escaped pair is that we don't seem 
to have tests for this case, or did I missed it? The example I tased was %5 
which isn't a complete pair and will be rejected. In any case, I think what you 
have is fine for now.

-------------

PR: https://git.openjdk.java.net/jdk/pull/1669

Reply via email to