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

Conversation

@shipilev
Copy link
Contributor

@shipilev shipilev commented Mar 22, 2021

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.


Progress

  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue
  • Change must be properly reviewed

Issue

  • JDK-8263981: java.awt.image.ComponentSampleModel equals/hashcode use numBands twice

Reviewers

Download

To checkout this PR locally:
$ git fetch https://git.openjdk.java.net/jdk pull/3125/head:pull/3125
$ git checkout pull/3125

To update a local copy of the PR:
$ git checkout pull/3125
$ git pull https://git.openjdk.java.net/jdk pull/3125/head

@bridgekeeper
Copy link

@bridgekeeper bridgekeeper bot commented Mar 22, 2021

👋 Welcome back shade! A progress list of the required criteria for merging this PR into master will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.

@openjdk openjdk bot added the rfr label Mar 22, 2021
@openjdk
Copy link

@openjdk openjdk bot commented Mar 22, 2021

@shipilev The following label will be automatically applied to this pull request:

  • 2d

When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing list. If you would like to change these labels, use the /label pull request command.

@openjdk openjdk bot added the 2d label Mar 22, 2021
@mlbridge
Copy link

@mlbridge mlbridge bot commented Mar 22, 2021

Webrevs

mrserb
mrserb approved these changes Mar 22, 2021
@openjdk
Copy link

@openjdk openjdk bot commented Mar 22, 2021

@shipilev This change now passes all automated pre-integration checks.

ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details.

After integration, the commit message for the final commit will be:

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

Reviewed-by: serb, azvegint

You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed.

At the time when this comment was updated there had been 85 new commits pushed to the master branch:

  • f62b100: 8263895: Test nsk/jvmti/GetThreadGroupChildren/getthrdgrpchld001/getthrdgrpchld001.cpp uses incorrect indices
  • f84b52b: 8263897: compiler/c2/aarch64/TestVolatilesSerial.java failed with "java.lang.RuntimeException: Wrong method"
  • f08bf4b: 8263891: Changes for 8076985 missed the fix.
  • b2df513: 8261785: Calling "main" method in anonymous nested class crashes the JVM
  • 840ab7b: 8263894: Convert defaultPrinter and printers fields to local variables
  • ba504fc: 8187450: JNI local refs exceeds capacity warning in NetworkInterface::getAll
  • 0abbfb2: 8263729: [test] divert spurious output away from stream under test in ProcessBuilder Basic test
  • 6c2220e: 8263861: Shenandoah: Remove unused member in ShenandoahGCStateResetter
  • 5262d95: 8263855: Use the blessed modifier order in java.management/naming
  • 6f1bcb0: 8263593: Fix multiple typos in hsdis README
  • ... and 75 more: https://git.openjdk.java.net/jdk/compare/d2144a5b9dcd4e6513f16dc6f3eda2987c8d763e...master

As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details.

➡️ To integrate this PR with the above commit message to the master branch, type /integrate in a new comment.

@openjdk openjdk bot added the ready label Mar 22, 2021
@shipilev
Copy link
Contributor Author

@shipilev shipilev commented Mar 24, 2021

/integrate

@openjdk openjdk bot closed this Mar 24, 2021
@openjdk openjdk bot added integrated and removed ready rfr labels Mar 24, 2021
@openjdk
Copy link

@openjdk openjdk bot commented Mar 24, 2021

@shipilev Since your change was applied there have been 123 commits pushed to the master branch:

  • da512bf: 8264050: Remove unused field VM_HeapWalkOperation::_collecting_heap_roots
  • 6e3a158: 8263352: assert(use == polladr) failed: the use should be a safepoint polling
  • 8d63bb6: 8260565: JFR: Fix copyright header in tests
  • 0b2aa1b: 8263978: Clarify why 0 argument is ignored in SecureRandom::setSeed
  • 15bcf6d: 8264055: backout JDK-8248904 in order to resubmit with additional attribution.
  • 2425462: 8263903: Use Cleaner instead of finalize to auto stop Timer thread
  • 35102cb: 8263992: Remove dead code NativeLookup::base_library_lookup
  • 91d86e6: 8263572: Output from jstack mixed mode is misaligned
  • 47ef038: 8263905: Remove finalize methods for SocketInput/OutputStream
  • 1c9817b: 8261479: CDS runtime code should check exceptions
  • ... and 113 more: https://git.openjdk.java.net/jdk/compare/d2144a5b9dcd4e6513f16dc6f3eda2987c8d763e...master

Your commit was automatically rebased without conflicts.

Pushed as commit cb776ed.

💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored.

@shipilev shipilev deleted the JDK-8263981-componentsamplemodel-twice branch Mar 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
3 participants