Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

8263981: java.awt.image.ComponentSampleModel equals/hashcode use numBands twice #3125

Closed
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
@@ -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;
shipilev marked this conversation as resolved.
Show resolved Hide resolved
hash ^= numBanks;
hash <<= 8;
hash ^= scanlineStride;