On Mon, 26 Aug 2024 15:27:39 GMT, Daniel Fuchs <dfu...@openjdk.org> wrote:

>> 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?

Is the if statement at line 470 redundant then? Presumably the code can reach 
here.

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

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

Reply via email to