RFR: 8338445: jdk.internal.loader.URLClassPath may leak JarFile instance when dealing with unexpected Class-Path entry in manifest [v2]

Jaikiran Pai jpai at openjdk.org
Mon Aug 26 15:40:04 UTC 2024


On Mon, 26 Aug 2024 15:33:58 GMT, Michael McMahon <michaelm at openjdk.org> wrote:

>> Because we would not reach here - since it's either assigned at line 447 or we continue at line 457, 468, or exit throwing an uncaught exception?
>
> Is the if statement at line 470 redundant then? Presumably the code can reach here.

Hello Michael,
> Is the if statement at line 470 redundant then?

`Loader.getClassPath()` can return null (and it does for some implementations of Loader). So the null check would still be needed.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/20691#discussion_r1731433502


More information about the core-libs-dev mailing list