RFR: 8190411: NPE in SliderSkin:140 if Slider.Tooltip.autohide is true [v4]
Karthik P K
kpk at openjdk.org
Tue Dec 6 11:25:49 UTC 2022
On Mon, 5 Dec 2022 17:16:01 GMT, Andy Goryachev <angorya at openjdk.org> wrote:
>> modules/javafx.controls/src/main/java/javafx/scene/control/skin/SliderSkin.java line 395:
>>
>>> 393:
>>> 394: thumb.setOnMouseEntered(me -> {
>>> 395: if (getSkinnable().getTooltip() != null && getSkinnable().getTooltip().isAutoHide()) {
>>
>> If I may suggest an edit in these two event handlers - create a local variable:
>>
>>
>> Tooltip t = getSkinnable().getTooltip();
>> if (t != null && t.isAutoHide()) {
>> tooltipConsumeAutoHidingEvents = t.getConsumeAutoHidingEvents();
>> t.setConsumeAutoHidingEvents(false);
>> }
>
> Also, since the reason for this change is not immediately obvious, I'd add a comment explaining why (perhaps above tooltipConsumeAutoHidingEvents declaration, line 64?)
Added above suggested edit and added comments
-------------
PR: https://git.openjdk.org/jfx/pull/965
More information about the openjfx-dev
mailing list