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

8242559: Clean the "libawt_xawt" library from code for headless mode #101

wants to merge 2 commits into from


Copy link

@mrserb mrserb commented Sep 9, 2020

This bug extracted from JDK-8240290[1]

The library is used by the headful toolkit, but it still
has some code related to the headless mode, which could be deleted.

In the fix, the HEADLESS related code was removed, to prove that we did
not build this library in HEADLESS mode, I added "#error This " to all
library files(but some of them already has it)


The old review request:


  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue
  • Change must be properly reviewed


Linux x32 Linux x64 Windows x64 macOS x64
Build ✔️ (1/1 passed) ✔️ (5/5 passed) ✔️ (2/2 passed) ✔️ (2/2 passed)
Test (tier1) ✔️ (9/9 passed) (1/9 failed) ✔️ (9/9 passed)

Failed test task


  • JDK-8242559: Clean the "libawt_xawt" library from code for headless mode



$ git fetch pull/101/head:pull/101
$ git checkout pull/101

Copy link

@bridgekeeper bridgekeeper bot commented Sep 9, 2020

👋 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 openjdk bot added the rfr label Sep 9, 2020
Copy link

@openjdk openjdk bot commented Sep 9, 2020

@mrserb The following label will be automatically applied to this pull request: awt.

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 (add|remove) "label" command.

@openjdk openjdk bot added the awt label Sep 9, 2020
Copy link

@mlbridge mlbridge bot commented Sep 9, 2020


Copy link

@prrace prrace left a comment

Clearly these are there to prevent mistakes. So they add value at a tiny build time cost.
I don't see the point of removing them.

Copy link
Member Author

@mrserb mrserb commented Sep 13, 2020

Clearly these are there to prevent mistakes. So they add value at a tiny build time cost.
I don't see the point of removing them.

That's the point of the fix, instead of implementing two versions of each method in these files just prevent compilation of the file in the headless mode. As far as understand both solutions are equivalent, but an assertion at the start of the file a much cleaner.

Copy link

@magicus magicus commented Sep 30, 2020

I agree with Sergey. This is much cleaner. All steps towards cleaning up the spaghetti code regarding headless/not headless are important, even if they are small. It's like solving the thousand paper cuts issue; you have to address every individual cut, not matter how miniscule.

Copy link

@openjdk openjdk bot commented Oct 21, 2020

@mrserb This change now passes all automated pre-integration checks.

ℹ️ This project also has non-automated pre-integration requirements. Please see the file for details.

After integration, the commit message for the final commit will be:

8242559: Clean the "libawt_xawt" library from code for headless mode

Reviewed-by: kizune

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

  • 7d3d4da: 8240709: Enable javax/swing/UI/UnninstallUIMemoryLeaks/ on all L&F
  • 5d26229: 8255174: Vector API unit tests for missed public api code coverage
  • b9186be: 6606767: resexhausted00[34] fail assert(!thread->owns_locks(), "must release all locks when leaving VM")
  • 1191a63: 8199697: FIPS 186-4 RSA Key Generation
  • 60d3fa2: 8255022: Documentation missing for Vector API zero methods

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 ready label Oct 21, 2020
Copy link
Member Author

@mrserb mrserb commented Oct 23, 2020


@openjdk openjdk bot closed this Oct 23, 2020
@openjdk openjdk bot added integrated and removed ready rfr labels Oct 23, 2020
Copy link

@openjdk openjdk bot commented Oct 23, 2020

@mrserb Since your change was applied there have been 17 commits pushed to the master branch:

  • ff5f226: 8255086: Update the root locale display names
  • 8afdcae: 8255031: Update java/util/prefs/ to report more failure info
  • 0aa3c92: 8255262: Remove use of legacy custom @SPEC tag
  • a0b687b: 8254854: [cgroups v1] Metric limits not properly detected on some join controller combinations
  • f279ddf: 8248411: [aarch64] Insufficient error handling when CodeBuffer is exhausted
  • 4634dbe: 8223312: Utilize handshakes instead of is_thread_fully_suspended
  • cc50c8d: 8255196: Remove unused G1FullGCCompactionPoint::merge()
  • ae72b52: 8255047: Add HotSpot UseDebuggerErgo flags
  • 211bb62: 8255124: KeepAliveStreamCleaner may crash with java.lang.IllegalMonitorStateException: current thread is not owner
  • 299e115: 8198395: Test javax/swing/plaf/metal/MetalLookAndFeel/ fails in mach5
  • ... and 7 more:

Your commit was automatically rebased without conflicts.

Pushed as commit d8d9197.

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

@mrserb mrserb deleted the JDK-8242559 branch Apr 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
4 participants