On Mon, 27 May 2024 09:31:51 GMT, Abhishek Kumar <[email protected]> wrote:
>> Prasanta Sadhukhan has updated the pull request incrementally with one
>> additional commit since the last revision:
>>
>> Additional null check
>
> src/java.desktop/share/classes/javax/swing/ToolTipManager.java line 273:
>
>> 271: GraphicsConfiguration gc = getDrawingGC(toFind);
>> 272: if (gc == null) {
>> 273: if (mouseEvent != null) {
>
> In the same method **showTipWindow**, mouseEvent's _getLocationOnScreen_
> method is accessed at
> [L268](https://github.com/openjdk/jdk/blame/da3001daf79bf943d6194d9fd60250d519b9680d/src/java.desktop/share/classes/javax/swing/ToolTipManager.java#L268C13-L268C13)
> and mouseEvent's _getX_ and _getY_ methods are accessed at
> [L304](https://github.com/openjdk/jdk/blame/da3001daf79bf943d6194d9fd60250d519b9680d/src/java.desktop/share/classes/javax/swing/ToolTipManager.java#L304),
> guess we should guard them as well with null check.
I had seen it but not sure in which condition it will fail as it had not failed
until now in those codepaths..But Anyways, I agree and added the null check..
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/19379#discussion_r1616519362