Skip to content
Permalink
Browse files
8263981: java.awt.image.ComponentSampleModel equals/hashcode use numB…
…ands twice

Reviewed-by: serb, azvegint
  • Loading branch information
shipilev committed Mar 24, 2021
1 parent da512bf commit cb776edfd71427cd74c7f5675033e62db11e39a8
Showing 1 changed file with 1 addition and 4 deletions.
@@ -1,5 +1,5 @@
/*
* Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 2021, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -1199,7 +1199,6 @@ public boolean equals(Object o) {
this.dataType == that.dataType &&
Arrays.equals(this.bandOffsets, that.bandOffsets) &&
Arrays.equals(this.bankIndices, that.bankIndices) &&
this.numBands == that.numBands &&
this.numBanks == that.numBanks &&
this.scanlineStride == that.scanlineStride &&
this.pixelStride == that.pixelStride;
@@ -1224,8 +1223,6 @@ public int hashCode() {
hash ^= bankIndices[i];
hash <<= 8;
}
hash ^= numBands;
hash <<= 8;
hash ^= numBanks;
hash <<= 8;
hash ^= scanlineStride;

1 comment on commit cb776ed

@openjdk-notifier
Copy link

@openjdk-notifier openjdk-notifier bot commented on cb776ed Mar 24, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.