On Mon, 14 Nov 2022 20:19:09 GMT, Andy Goryachev <ango...@openjdk.org> wrote:

>> modules/javafx.controls/src/main/java/com/sun/javafx/scene/control/ListenerHelper.java
>>  line 87:
>> 
>>> 85: 
>>> 86:     public static ListenerHelper get(SkinBase<?> skin) {
>>> 87:         return accessor.apply(skin);
>> 
>> `accessor` can be `null` and needs to be checked.
>
> I don't think this is the case.
> When this method is called, SkinBase class must be already loaded and 
> resolved, that means it's static { } block, which sets the accessor, has been 
> executed.  But just in case, I should move the static block in SkinBase, so 
> we don't have any surprises.

Right, there is no way the accessor can be null, since it is initialized at 
class load time in the static initializer, We do this in many other places 
(e.g., Node.java).

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

PR: https://git.openjdk.org/jfx/pull/908

Reply via email to