Skip to content

Conversation

@mrserb
Copy link
Member

@mrserb mrserb commented Apr 29, 2025

The java.desktop module currently lacks proper use of the @Override annotation for methods and the final modifier for classes. While similar changes were previously made in the JavaSound, java.desktop/windows (and some of the classes on demand), these changes are not as critical now due to the new jdk "encapsulation", but they are still useful for improving code consistency.

To make the code review process easier I have made the following changes:

  1. I chose java.desktop/unix:sun.awt as the starting package because it contains a relatively small number of classes
  2. The public API was not affected so there is no need to worry about a CSR

Note: I will submit additional patches in this area later because:

  1. Only lines with @Override and final were modified to keep the diff clear - header dates were not updated (that could be covered by one patch similar to this)
  2. I skipped adding @Override for anonymous classes

Any feedback or suggestions are welcome!

Here is a link to a simple diff file, it might be more convenient for reviewing the changes.

To download the diff file and filter only the modified lines you can use the following script:

curl -s https://patch-diff.githubusercontent.com/raw/openjdk/jdk/pull/24941.diff -o d.txt && grep -E '^\+|^\-' d.txt

The build was successful, and I ran all the open jtreg tests without issues. But it's possible that some closed tests may be affected by these changes. It would be good to verify this by mach5 to ensure everything works as expected.


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-8355790: Enhance code consistency: java.desktop/unix:sun.awt (Bug - P5)

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 24941

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

Using diff file

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

Using Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented Apr 29, 2025

👋 Welcome back serb! 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 Apr 29, 2025

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

8355790: Enhance code consistency: java.desktop/unix:sun.awt

Reviewed-by: achung, 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 no new commits pushed to the master branch. If another commit should be pushed before you perform the /integrate command, your PR will be automatically rebased. If you prefer to avoid any potential 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 Apr 29, 2025

@mrserb 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 Apr 29, 2025
@mrserb mrserb marked this pull request as ready for review May 1, 2025 22:08
@openjdk openjdk bot added the rfr Pull request is ready for review label May 1, 2025
@mlbridge
Copy link

mlbridge bot commented May 1, 2025

Webrevs

Copy link
Contributor

@alisenchung alisenchung left a comment

Choose a reason for hiding this comment

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

I've run the clientlibs tests on mach5 and everything passes.

@openjdk openjdk bot added the ready Pull request is ready to be integrated label May 9, 2025
@mrserb
Copy link
Member Author

mrserb commented May 11, 2025

/integrate

@openjdk
Copy link

openjdk bot commented May 11, 2025

Going to push as commit 97d2a37.
Since your change was applied there has been 1 commit pushed to the master branch:

  • 4369603: 8356597: AOT cache and CDS archive should not be created in read-only mode

Your commit was automatically rebased without conflicts.

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

openjdk bot commented May 11, 2025

@mrserb Pushed as commit 97d2a37.

💡 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