On Wed, 17 Apr 2024 06:18:39 GMT, Tejesh R <[email protected]> wrote: >> The logical || operator doesn't check second condition if first condition is >> true. It checks second condition only if first one is false. >> So as per current logic, if RED component is not equal, it doesn't check for >> GREEN and BLUE component and fails. > > Exactly, similar thing applies to && and hence in failure condition || checks > for all the colors while && drops off at first failure only. Which is why I > suggested it would be better for failure cases.
Yeah, its `!=` here right, then it'll fail fast for failure conditions...... Then no need to optimize...... ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/18644#discussion_r1568288421
