Skip to content

8345398: Avoid redundant Properties.containsKey call in Cursor.getSystemCustomCursor #21824

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

Conversation

turbanoff
Copy link
Member

@turbanoff turbanoff commented Nov 1, 2024

Properties doesn't allow null values.
We can replace containsKey+getProperty with getProperty+null check.
It's clearer and a bit faster.


Progress

  • Change must be properly reviewed (1 review required, with at least 1 Reviewer)
  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue

Issue

  • JDK-8345398: Avoid redundant Properties.containsKey call in Cursor.getSystemCustomCursor (Enhancement - P5)

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/21824/head:pull/21824
$ git checkout pull/21824

Update a local copy of the PR:
$ git checkout pull/21824
$ git pull https://git.openjdk.org/jdk.git pull/21824/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 21824

View PR using the GUI difftool:
$ git pr show -t 21824

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/21824.diff

Using Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented Nov 1, 2024

👋 Welcome back aturbanov! 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
Copy link

openjdk bot commented Nov 1, 2024

@turbanoff 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:

8345398: Avoid redundant Properties.containsKey call in Cursor.getSystemCustomCursor

Reviewed-by: aivanov, prr

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 654 new commits pushed to the master branch:

  • de3a218: 8345502: Remove doIntersectionPrivilege methods
  • faa109e: 8340580: Characters in Document diagrams not in the middle
  • 6aa7667: 8339535: JVM crashes with -Xshare:dump -XX:+SegmentedCodeCache
  • e1695f6: 8345472: Fix incorrect format instruction for floating point max/min patterns
  • baa6957: 8345507: Fix build of static launcher
  • 79eb77b: 8345486: Reevaluate the classes in java.lang.classfile.components package
  • f3b4350: 8345219: C2: x86_64 should not go to interpreter stubs for NaNs handling
  • 16ef6e2: 8344229: Revisit SecurityManager usage in jdk.httpserver after JEP 486 integration
  • 923321c: 8345447: test/jdk/javax/swing/JToolBar/4529206/bug4529206.java fails in ubuntu22.04
  • 6f30762: 8345468: test/jdk/javax/swing/JScrollBar/4865918/bug4865918.java fails in ubuntu22.04
  • ... and 644 more: https://git.openjdk.org/jdk/compare/f77a5144a12fc31bad8b672a3cc9caa688d78e72...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
Copy link

openjdk bot commented Nov 1, 2024

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

  • client

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 client client-libs-dev@openjdk.org label Nov 1, 2024
@bridgekeeper
Copy link

bridgekeeper bot commented Nov 29, 2024

@turbanoff This pull request has been inactive for more than 4 weeks and will be automatically closed if another 4 weeks passes without any activity. To avoid this, simply add a new comment to the pull request. Feel free to ask for assistance if you need help with progressing this pull request towards integration!

@turbanoff turbanoff changed the title [PATCH] Avoid redundant Properties.containsKey calls in Cursor.getSystemCustomCursor 8345398: Avoid redundant Properties.containsKey call in Cursor.getSystemCustomCursor Dec 3, 2024
@openjdk openjdk bot added the rfr Pull request is ready for review label Dec 3, 2024
@mlbridge
Copy link

mlbridge bot commented Dec 3, 2024

Webrevs

Copy link
Member

@aivanov-jdk aivanov-jdk left a comment

Choose a reason for hiding this comment

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

Anyway, it looks good to me.

Messing around with final doesn't bring much value. However, it may make the code look more consistent.

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Dec 4, 2024
remove 'final' from 'localized' too
@openjdk openjdk bot removed the ready Pull request is ready to be integrated label Dec 4, 2024
@openjdk openjdk bot added the ready Pull request is ready to be integrated label Dec 4, 2024
@turbanoff
Copy link
Member Author

Thank you for review!

/integrate

@openjdk
Copy link

openjdk bot commented Dec 5, 2024

Going to push as commit 3b7571d.
Since your change was applied there have been 676 commits pushed to the master branch:

  • ca46c3a: 8343622: AesDkCrypto.stringToKey should not return null
  • e46d822: 8345547: test/jdk/javax/swing/text/DefaultEditorKit/4278839/bug4278839.java fails in ubuntu22.04
  • 2331782: 8345179: RISC-V: Add gtests for weak cmpxchg
  • 7c8cec1: 8345224: Test runtime/cds/appcds/applications/JavacBench.java#dynamic fails after JDK-8344822
  • 77cfcee: 8345422: Fix JNI Checker "in native method" warnings in the debug agent and debugger tests
  • 67a7b00: 8345355: [s390x] support for z16 hardware
  • 9c3d3b9: 8345503: Test EnableNativeAccessCDS.java fails with TEST_THREAD_FACTORY=Virtual
  • fb95a53: 8345533: Switch ML-DSA implementation to FIPS 204 final
  • 63d0951: 8345153: Clean up SecurityManager references from jdk.compiler module
  • 7a0cc79: 8345438: Invalid error for return in early construction context lambda
  • ... and 666 more: https://git.openjdk.org/jdk/compare/f77a5144a12fc31bad8b672a3cc9caa688d78e72...master

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot added the integrated Pull request has been integrated label Dec 5, 2024
@openjdk openjdk bot closed this Dec 5, 2024
@openjdk openjdk bot removed ready Pull request is ready to be integrated rfr Pull request is ready for review labels Dec 5, 2024
@openjdk
Copy link

openjdk bot commented Dec 5, 2024

@turbanoff Pushed as commit 3b7571d.

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
client client-libs-dev@openjdk.org integrated Pull request has been integrated
Development

Successfully merging this pull request may close these issues.

3 participants