RFR: JDK-8287261: [macos] JList Focus Ring color doesn't follow Accent color changes on macOS [v2]
Harshitha Onkar
honkar at openjdk.java.net
Wed Jun 1 19:40:36 UTC 2022
On Wed, 1 Jun 2022 16:54:43 GMT, Harshitha Onkar <honkar at openjdk.org> wrote:
>> test/jdk/javax/swing/JTable/CellFocusRingTest.java line 85:
>>
>>> 83: }
>>> 84:
>>> 85: if (UIManager.getDefaults().get("CellFocus.color") != null
>>
>> if (UIManager.getDefaults().get("CellFocus.color") != null
>> && UIManager.getDefaults().get("CellFocus.color")
>> instanceof Color)
>>
>> can be changed into
>>
>> if (UIManager.getDefaults().get("CellFocus.color")
>> instanceof Color)
>>
>> Since if the object is null then `instanceof` returns false.
>
> @TejeshR13 Your suggestion was to remove redundant null check. Correct, this is a better way to shorten the condition. Will have the changes done in the next commit.
Updated PR with changes
-------------
PR: https://git.openjdk.java.net/jdk/pull/8896
More information about the client-libs-dev
mailing list