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

8286663: Resolve IDE warnings in WTrayIconPeer and SystemTray #8850

Closed

Conversation

aivanov-jdk
Copy link
Member

@aivanov-jdk aivanov-jdk commented May 23, 2022

WTrayIconPeer: removed duplicate call to popupParent.dispose() that might cause NPE (it looks popupParent cannot be null); organised imports.

SystemTray: removed redundant initialisers; replaced sized array with empty array in toArray call; dropped newValue != null chained with equals.


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-8286663: Resolve IDE warnings in WTrayIconPeer and SystemTray

Reviewers

Reviewing

Using git

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

Update a local copy of the PR:
$ git checkout pull/8850
$ git pull https://git.openjdk.java.net/jdk pull/8850/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 8850

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

Using diff file

Download this PR as a diff file:
https://git.openjdk.java.net/jdk/pull/8850.diff

@bridgekeeper
Copy link

bridgekeeper bot commented May 23, 2022

👋 Welcome back aivanov! 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 Pull request is ready for review label May 23, 2022
@openjdk
Copy link

openjdk bot commented May 23, 2022

@aivanov-jdk 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 May 23, 2022
@mlbridge
Copy link

mlbridge bot commented May 23, 2022

Webrevs

@honkar-jdk
Copy link
Contributor

@aivanov-jdk In SystemTray.java the following line can be simplified using method reference or lambda expression.

new AWTAccessor.SystemTrayAccessor() {

@aivanov-jdk
Copy link
Member Author

@aivanov-jdk In SystemTray.java the following line can be simplified using method reference or lambda expression.

new AWTAccessor.SystemTrayAccessor() {

I left it out intentionally, it's still unclear to me what style the client-libs follow.

I prefer using method references where possible.

If method reference is used, the code becomes much shorter:

        AWTAccessor.setSystemTrayAccessor(SystemTray::firePropertyChange);

What do others think?

@prrace
Copy link
Contributor

prrace commented Jun 1, 2022

If method reference is used, the code becomes much shorter:

        AWTAccessor.setSystemTrayAccessor(SystemTray::firePropertyChange);

What do others think?

I am sure this code pre-dates method references, but if updating something then using method references is perfectly OK.

@openjdk
Copy link

openjdk bot commented Jun 1, 2022

@aivanov-jdk 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:

8286663: Resolve IDE warnings in WTrayIconPeer and SystemTray

Reviewed-by: prr, serb, honkar

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

  • 1aa87e0: 8287148: Avoid redundant HashMap.containsKey calls in ExtendedKeyCodes.getExtendedKeyCodeForChar
  • 74be2d9: 8286983: rename jdb -trackvthreads and debug agent enumeratevthreads options and clarify "Preview Feature" nature of these options
  • 8e10c2b: 8287877: Exclude vmTestbase/nsk/jvmti/AttachOnDemand/attach022/TestDescription.java until JDK-8277573 is fixed
  • 9ec27d0: 8287872: Disable concurrent execution of hotspot docker tests
  • 91e6bf6: 8287919: ProblemList java/lang/CompressExpandTest.java
  • 3da7e39: 8287840: Dead copy region node blocks IfNode's fold-compares
  • c41a283: 8273853: Update the Java manpage for automatic CDS archive updating
  • 41d5809: 8287811: JFR: jfr configure error message should not print stack trace
  • 5d4ea9b: 8273346: Expand library mappings to IEEE 754 operations
  • 96641c0: 8287745: jni/nullCaller/NullCallerTest.java fails with "exitValue = 1"
  • ... and 230 more: https://git.openjdk.java.net/jdk/compare/689f80cbadb0d17d61b7dc83512d0f6ef94cc204...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 Pull request is ready to be integrated label Jun 1, 2022
@aivanov-jdk
Copy link
Member Author

/integrate

@openjdk
Copy link

openjdk bot commented Jun 8, 2022

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

  • b021d37: 8283383: [macos] a11y : Screen magnifier shows extra characters (0) at the end JButton accessibility name
  • 78d3712: 8287432: C2: assert(tn->in(0) != __null) failed: must have live top node
  • f7791ad: 8287895: Some langtools tests fail on msys2
  • 5ad6286: 8287970: riscv: jdk/incubator/vector/*VectorTests failing
  • a9d46f3: 8287894: Use fixed timestamp as an alternative of DATE macro in jdk.jdi to make Windows build reproducible
  • 6e3e470: 8285965: TestScenarios.java does not check for "" correctly
  • d959c22: 8288000: compiler/loopopts/TestOverUnrolling2.java fails with release VMs
  • 230726e: 8287735: Provide separate event category for dll operations
  • ecf0078: 8287442: Reduce list to array conversions in java.lang.invoke.MethodHandles
  • 5c39a36: 8287522: StringConcatFactory: Add in prependers and mixers in batches
  • ... and 254 more: https://git.openjdk.java.net/jdk/compare/689f80cbadb0d17d61b7dc83512d0f6ef94cc204...master

Your commit was automatically rebased without conflicts.

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

openjdk bot commented Jun 8, 2022

@aivanov-jdk Pushed as commit a9b9831.

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

@aivanov-jdk aivanov-jdk deleted the 8286663-WTrayIcon-SystemTray branch September 14, 2022 19:58
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
4 participants