On Fri, 15 Nov 2024 22:07:19 GMT, Kevin Rushforth <k...@openjdk.org> wrote:
>> 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`. oops. he is right, Kevin you have a mistake "or else Boolean.parseBoolean("sun.java2d.twp.forcesw");" you mean Boolean.getBoolean(..) ! I think the first change made was to Boolean.parseBoolean(System.getProperty("sun.java2d.twp.forceopt", "false")); and I suggested changing to the simpler Boolean.getBoolean() but I meant as a replacement for BOTH calls. ie to Boolean.getBoolean("sun.java2d.twp.forcesw") I didn't notice the mistake on re-review. I guess I too quickly assumed updates were likely to be corrections. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/22083#discussion_r1844609161