RFR: 8289397: Fix warnings: Possible accidental assignment in place of a comparison. A condition expression should not be reduced to an assignment [v2]

Kevin Rushforth kcr at openjdk.org
Tue Jul 26 22:55:03 UTC 2022


On Tue, 26 Jul 2022 22:50:49 GMT, Andy Goryachev <angorya at openjdk.org> wrote:

>> - replaced with exact functional equivalent (in the presence of exceptions, for example)
>
> Andy Goryachev has updated the pull request incrementally with two additional commits since the last revision:
> 
>  - 8289397: review comments
>  - Revert "8289397: functional equivalent"
>    
>    This reverts commit 6ae0ef60b186c75993fe7faa099140b26593d308.

modules/javafx.graphics/src/main/java/com/sun/javafx/util/Utils.java line 875:

> 873:     public static boolean assertionEnabled() {
> 874:         boolean assertsEnabled = false;
> 875:         assert (assertsEnabled = true) == true;

Is it worth leaving the "Intentional side-effect" comment?

-------------

PR: https://git.openjdk.org/jfx/pull/851


More information about the openjfx-dev mailing list