[crac] RFR: More robust classpath parsing [v2]

Radim Vansa rvansa at openjdk.org
Mon Nov 20 09:31:04 UTC 2023


On Thu, 16 Nov 2023 10:36:08 GMT, Roman Marchenko <rmarchenko at openjdk.org> wrote:

>> Radim Vansa has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Use File() ctor instead of custom parsing
>
> src/java.base/share/classes/jdk/internal/crac/JDKFileResource.java line 28:
> 
>> 26:         CLASSPATH_ENTRIES = new Path[items.length];
>> 27:         for (int i = 0; i < items.length; i++) {
>> 28:             // On Windows, path with forward slashes starting with '/' is an accepted classpath
> 
> With the latest change do you think this comment is still needed?

Yes; I think that `Path.of(...)` is the correct way to convert a `String` to a `Path`. So here we're using suboptimal conversion `String` -> `File` -> `Path` as we know that the implementation does normalization on invalid input.

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

PR Review Comment: https://git.openjdk.org/crac/pull/140#discussion_r1398874223


More information about the crac-dev mailing list