On Mon, 22 Mar 2021 15:55:16 GMT, Aleksey Shipilev <sh...@openjdk.org> wrote:
> SonarCloud reports the problem in ComponentSampleModel.equals: > Correct one of the identical sub-expressions on both sides of operator "&&" > > ...near "this.numBands == that.numBands". It is checked twice. hashCode also > processes it twice. Marked as reviewed by serb (Reviewer). src/java.desktop/share/classes/java/awt/image/ComponentSampleModel.java line 1228: > 1226: } > 1227: hash ^= numBands; > 1228: hash <<= 8; Since this mistake was done in two places I think this is a typo here and not an intentional thing. ------------- PR: https://git.openjdk.java.net/jdk/pull/3125