RFR: 8338445: jdk.internal.loader.URLClassPath may leak JarFile instance when dealing with unexpected Class-Path entry in manifest [v2]
Daniel Fuchs
dfuchs at openjdk.org
Mon Aug 26 15:30:06 UTC 2024
On Mon, 26 Aug 2024 15:17:18 GMT, Michael McMahon <michaelm at openjdk.org> wrote:
>> Jaikiran Pai has updated the pull request incrementally with three additional commits since the last revision:
>>
>> - revert to old code comment
>> - use "JAR file" consistently in test's code comments
>> - rename closeLoaderIgnoreEx to closeQuietly
>
> src/java.base/share/classes/jdk/internal/loader/URLClassPath.java line 470:
>
>> 468: continue;
>> 469: }
>> 470: if (loaderClassPathURLs != null) {
>
> I'm missing something here. Why does the compiler not complain that `loaderClassPathURLs` might not be initialized, when it's accessed here?
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?
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/20691#discussion_r1731421835
More information about the core-libs-dev
mailing list