On Tue, 10 May 2022 11:31:16 GMT, Andrey Turbanov <aturba...@openjdk.org> wrote:

>> src/java.desktop/share/classes/javax/imageio/spi/ServiceRegistry.java line 
>> 230:
>> 
>>> 228:         List<SubRegistry> l = new ArrayList<>();
>>> 229:         for (Class<?> c : categoryMap.keySet()) {
>>> 230:             if (c.isInstance(provider)) {
>> 
>> Can this be reached if `provider` is null? If yes there could be a change of 
>> behaviour as the previous code would have thrown NPE.
>
> No. This method is called from 3 places,  and there 3 null checks before the 
> method call.

Thanks for double checking! LGTM then.

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

PR: https://git.openjdk.java.net/jdk/pull/7061

Reply via email to