On Fri, 15 Nov 2024 21:26:39 GMT, msternermxy <[email protected]> wrote:
>> Prasanta Sadhukhan has updated the pull request incrementally with one
>> additional commit since the last revision:
>>
>> Review comment
>
> src/java.desktop/windows/classes/sun/awt/windows/TranslucentWindowPainter.java
> line 71:
>
>> 69: Boolean.getBoolean(System.getProperty("sun.java2d.twp.forceopt",
>> "false"));
>> 70: private static final boolean forceSW =
>> 71: Boolean.getBoolean(System.getProperty("sun.java2d.twp.forcesw",
>> "false"));
>
> This seems to mistakenly combine `Boolean.getBoolean()` and
> `System.getProperty()`, instead of only using the former or using
> `Boolean.parseBoolean()` with the latter. Same issue above for `forceOpt`.
Skara hasn't removed the above "Terms of User" banner, but I'm pretty sure that
@msternermxy is right, and that this is not equivalent to the original.
It should either be
`Boolean.parseBoolean(System.getProperty("sun.java2d.twp.forcesw", "false"));`
or else `Boolean.parseBoolean("sun.java2d.twp.forcesw");` -- the latter being
OK because false is the default for a property that is not set. Same for
`forceOpt`.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/22083#discussion_r1844578313