<Swing Dev> RFR: 8262085: Hovering Metal HTML Tooltips in different windows cause IllegalArgExc on Linux [v2]
Alexander Zvegintsev
azvegint at openjdk.java.net
Mon Mar 1 11:15:10 UTC 2021
On Mon, 1 Mar 2021 04:08:43 GMT, Prasanta Sadhukhan <psadhukhan at openjdk.org> wrote:
>> Alexander Zvegintsev has updated the pull request incrementally with one additional commit since the last revision:
>>
>> simplified test
>
> test/jdk/javax/swing/JToolTip/FastTooltipSwitchIAE.java line 61:
>
>> 59: } catch (ClassNotFoundException | InstantiationException |
>> 60: UnsupportedLookAndFeelException | IllegalAccessException e) {
>> 61: throw new RuntimeException(e);
>
> Normally for UnsupportedLookAndFeelException, we dont throw Exception, rather print and continue to next L&F.
Done.
> src/java.desktop/share/classes/javax/swing/plaf/metal/MetalToolTipUI.java line 124:
>
>> 122: if (paintTextR.width <= 0 || paintTextR.height <= 0) {
>> 123: return;
>> 124: }
>
> Any idea why only MetalToolTip is affected only? JDK-8040630 fix was generic so shouldn't we apply this fix in BasicToolTipUI#paint instead?
Only Metal LaF uses `BasicHTML#getHTMLBaseline` for HTML tooltips painting.
Changing of `BasicToolTipUI#paint` will have no effect since it is not on the call stack.
-------------
PR: https://git.openjdk.java.net/jdk/pull/2761
More information about the swing-dev
mailing list