On Mon, 26 Aug 2024 15:36:25 GMT, Jaikiran Pai <j...@openjdk.org> wrote:
>> 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. What if `getLoader(url)` throws an exception so `Loader.getClassPath()` is not called? Okay, I see Daniel's point, that in that case, the code is not reached. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/20691#discussion_r1731446869