8318091: Remove empty initIDs functions#16372
8318091: Remove empty initIDs functions#16372djelinski wants to merge 6 commits intoopenjdk:masterfrom
Conversation
|
👋 Welcome back djelinski! A progress list of the required criteria for merging this PR into |
|
@djelinski The following label will be automatically applied to this pull request:
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. |
|
So this looks OK. The main thing I would worry about is that there isn't some code path which needs It is difficult to prove there is no such case. Tests may not be 100% coverage of all code paths. |
|
@djelinski 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: 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 20 new commits pushed to the
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 |
aivanov-jdk
left a comment
There was a problem hiding this comment.
It looks good to me. The only concern I have, similar to Phil, is that peer implementations do not load the toolkit libraries. For this reason, I am for keeping the call to Toolkit.loadLibraries() in the static initializer of java.awt.Button, java.awt.FileDialog, java.awt.KeyboardFocusManager and java.awt.TextField.
| static { | ||
| /* ensure that the necessary native libraries are loaded */ | ||
| Toolkit.loadLibraries(); |
There was a problem hiding this comment.
I think it is safer to preserve loading the toolkit libraries: Button is a peered component and I can't see any of the peers loads the libraries.
There was a problem hiding this comment.
Button extends Component, which loads libraries
There was a problem hiding this comment.
another thing to note is that the peers are created by the toolkit which init awt lib on startup.
|
|
||
| static { | ||
| /* ensure that the necessary native libraries are loaded */ | ||
| Toolkit.loadLibraries(); |
There was a problem hiding this comment.
The same is here: I see no clear path to load the toolkit libraries from the peers, and peers do have native methods, including initIDs.
It looks as if peer implementations depend on the fact that the corresponding public API classes ensure the libraries are loaded.
There was a problem hiding this comment.
FileDialog extends Dialog, which loads libraries
Then it's handled, obviously. And We're good then, no further changes needed. Thank you! |
|
/integrate |
|
Going to push as commit c593f8b.
Your commit was automatically rebased without conflicts. |
|
@djelinski Pushed as commit c593f8b. 💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored. |
The removed functions are empty on all platforms.
This patch also removes calls to
Toolkit.loadLibraries();in classes that no longer have any native methods. The call was needed to ensure that the native awt library is loaded.Client libs tests passed.
Progress
Issue
Reviewers
Reviewing
Using
gitCheckout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/16372/head:pull/16372$ git checkout pull/16372Update a local copy of the PR:
$ git checkout pull/16372$ git pull https://git.openjdk.org/jdk.git pull/16372/headUsing Skara CLI tools
Checkout this PR locally:
$ git pr checkout 16372View PR using the GUI difftool:
$ git pr show -t 16372Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/16372.diff
Webrev
Link to Webrev Comment