Skip to content

8386698: PlatformUtil has unused fields and methods#2190

Closed
Maran23 wants to merge 1 commit into
openjdk:masterfrom
Maran23:8386698-PlatformUtil-has-unused-fields-and-methods
Closed

8386698: PlatformUtil has unused fields and methods#2190
Maran23 wants to merge 1 commit into
openjdk:masterfrom
Maran23:8386698-PlatformUtil-has-unused-fields-and-methods

Conversation

@Maran23

@Maran23 Maran23 commented Jun 16, 2026

Copy link
Copy Markdown
Member

When I did #2146, I touched PlatformUtil and saw that some methods and fields are unused and will probably never be used.

Example:

  • isWinVistaOrLater()
  • useGLES2()

So I removed them. Also checked that they are not called by native code.
I kept isHeadless(), as it was used in a test at one point and might be needed again at some point.
Moved isAndroid right below the other isXXX methods.



Progress

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

Issue

  • JDK-8386698: PlatformUtil has unused fields and methods (Enhancement - P4)

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 2190

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

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jfx/pull/2190.diff

Using Webrev

Link to Webrev Comment

@bridgekeeper

bridgekeeper Bot commented Jun 16, 2026

Copy link
Copy Markdown

👋 Welcome back mhanl! 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 commented Jun 16, 2026

Copy link
Copy Markdown

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

8386698: PlatformUtil has unused fields and methods

Reviewed-by: lkostyra, angorya, jvos

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 1 new commit pushed to the master branch:

  • 6e2f869: 8382256: Unused method in TreeUtil can be cleaned up

Please see this link for an up-to-date comparison between the source branch of this pull request and the master branch.
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 rfr Ready for review label Jun 16, 2026
@openjdk

openjdk Bot commented Jun 16, 2026

Copy link
Copy Markdown

The total number of required reviews for this PR has been set to 2 based on the presence of this label: rfr. This can be overridden with the /reviewers command.

@mlbridge

mlbridge Bot commented Jun 16, 2026

Copy link
Copy Markdown

Webrevs

@lukostyra lukostyra left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks good. Tests run as per usual and these don't seem to be used anywhere.

@andy-goryachev-oracle

Copy link
Copy Markdown
Contributor

isHeadless() is still being used by MacPasteboardTest.

@andy-goryachev-oracle andy-goryachev-oracle left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks good. I wonder if @johanvos should also take a look at this change, just in case.

@openjdk openjdk Bot added the ready Ready to be integrated label Jun 16, 2026
@Maran23

Maran23 commented Jun 17, 2026

Copy link
Copy Markdown
Member Author

isHeadless() is still being used by MacPasteboardTest.

You are right! My IDE was not listing this class for whatever reason - IntelliJ seems to have problems with detecting systemTests sometimes for me. Even better that it is used!

Looks good. I wonder if @johanvos should also take a look at this change, just in case.

+1. Even though this is an internal class, I was wondering the same thing (maybe there's some custom code at Gluon or similar). Will wait until we get a response, since it's not urgent.

@johanvos johanvos left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

The removed fields do not affect the mobile ports.

@johanvos

Copy link
Copy Markdown
Collaborator

thanks for pinging me. No harm done by removing those fields.

@Maran23

Maran23 commented Jun 17, 2026

Copy link
Copy Markdown
Member Author

/integrate

@openjdk

openjdk Bot commented Jun 17, 2026

Copy link
Copy Markdown

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

  • 6e2f869: 8382256: Unused method in TreeUtil can be cleaned up

Your commit was automatically rebased without conflicts.

@openjdk openjdk Bot added the integrated Pull request has been integrated label Jun 17, 2026
@openjdk openjdk Bot closed this Jun 17, 2026
@openjdk openjdk Bot removed ready Ready to be integrated rfr Ready for review labels Jun 17, 2026
@openjdk

openjdk Bot commented Jun 17, 2026

Copy link
Copy Markdown

@Maran23 Pushed as commit b932758.

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

@Maran23 Maran23 deleted the 8386698-PlatformUtil-has-unused-fields-and-methods branch July 3, 2026 15:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

integrated Pull request has been integrated

Development

Successfully merging this pull request may close these issues.

4 participants