[OpenJDK 2D-Dev] RFR: 8263981: java.awt.image.ComponentSampleModel equals/hashcode use numBands twice

Alexander Zvegintsev azvegint at openjdk.java.net
Mon Mar 22 18:07:38 UTC 2021

On Mon, 22 Mar 2021 15:55:16 GMT, Aleksey Shipilev <shade at 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 azvegint (Reviewer).


PR: https://git.openjdk.java.net/jdk/pull/3125

More information about the 2d-dev mailing list