On Tue, 16 May 2023 06:49:37 GMT, Andrey Turbanov <[email protected]> wrote:
>> Rajat Mahajan has updated the pull request incrementally with two additional
>> commits since the last revision:
>>
>> - code cleanup as per suggestions from reviewers
>> - code cleanup from suggestions in code review
>
> src/java.desktop/windows/classes/sun/awt/windows/ThemeReader.java line 104:
>
>> 102: }
>> 103:
>> 104: if (dpiAwareWidgetToTheme.get(dpi) != null) {
>
> use computeIfAbsent
Yes,
[`computeIfAbsent`](https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/Map.html#computeIfAbsent(K,java.util.function.Function))
could simplify the code.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/13701#discussion_r1194944245