RFR: 8190411: NPE in SliderSkin:140 if Slider.Tooltip.autohide is true [v4]
Andy Goryachev
angorya at openjdk.org
Mon Dec 5 17:21:49 UTC 2022
On Mon, 5 Dec 2022 16:57:05 GMT, Andy Goryachev <angorya at openjdk.org> wrote:
>> Karthik P K has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Update in mouse enter and exit events. Update in unit test
>
> 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?)
-------------
PR: https://git.openjdk.org/jfx/pull/965
More information about the openjfx-dev
mailing list