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

8325851: Hide PassFailJFrame.Builder constructor #18206

Closed
wants to merge 15 commits into from

Conversation

aivanov-jdk
Copy link
Member

@aivanov-jdk aivanov-jdk commented Mar 11, 2024

The Builder class in PassFailJFrame is public and has a public constructor. At the same time, a better design would be to hide all the Builder constructors and rely on the builder() method which returns an instance of the Builder class.

This PR makes the constructor of the Builder class private so that it's not accessible directly.

Use PassFailJFrame.builder() to get an instance of the builder and configure parameters of PassFailJFrame.

I updated all the tests which used the constructor directly by calling new PassFailJFrame.Builder().

I converted a few tests to use the testUI, which greatly simplifies the test code. This change also removes flickering of the test UI.


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-8325851: Hide PassFailJFrame.Builder constructor (Bug - P5)

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 18206

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

Using diff file

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

Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented Mar 11, 2024

👋 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 Mar 11, 2024
@openjdk
Copy link

openjdk bot commented Mar 11, 2024

@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 Mar 11, 2024
@mlbridge
Copy link

mlbridge bot commented Mar 11, 2024

Webrevs

Copy link
Contributor

@honkar-jdk honkar-jdk left a comment

Choose a reason for hiding this comment

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

PassFailJFrame's Builder changes and corresponding test changes look good.

@openjdk
Copy link

openjdk bot commented Mar 12, 2024

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

8325851: Hide PassFailJFrame.Builder constructor

Reviewed-by: honkar, 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 26 new commits pushed to the master branch:

  • 22f10e0: 8327856: Convert applet test SpanishDiacriticsTest.java to a main program
  • 7283c8b: 8327972: Convert java/awt/FileDialog/SaveFileNameOverrideTest/SaveFileNameOverrideTest.html applet test to main
  • 30249c4: 8327838: Convert java/awt/FileDialog/MultipleMode/MultipleMode.html applet test to main
  • 94b4ed5: 8327096: (fc) java/nio/channels/FileChannel/Size.java fails on partition incapable of creating large files
  • b9c3dc3: 8327738: Remove unused internal method sun.n.w.p.h.HttpURLConnection.setDefaultAuthenticator
  • 5b41466: 8327729: Remove deprecated xxxObject methods from jdk.internal.misc.Unsafe
  • 313e814: 8324682: Remove redefinition of NULL for XLC compiler
  • 8a3bdd5: 8327995: Remove unused Unused_Variable
  • 201042f: 8327487: Further augment WorstCaseTests with more cases
  • 379ad1f: 8312444: Delete unused parameters and variables in SocketPermission
  • ... and 16 more: https://git.openjdk.org/jdk/compare/0a6e64e2f50cb5eb969dbd0807ad3edc1c353923...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 Mar 12, 2024
@aivanov-jdk
Copy link
Member Author

/integrate

@openjdk
Copy link

openjdk bot commented Mar 14, 2024

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

  • ad0f329: 8327787: Convert javax/swing/border/Test4129681.java applet test to main
  • a43c3cc: 8327826: Convert javax/swing/border/Test4243289.java applet test to main
  • 11a3673: 8328110: Allow simultaneous use of PassFailJFrame with split UI and additional windows
  • 1281e18: 8325613: CTW: Stale method cleanup requires GC after Sweeper removal
  • 49ce85f: 8327874: Convert javax/swing/JTree/4314199/bug4314199.java applet test to main
  • 481c866: 8327468: Do not restart close if errno is EINTR [macOS/linux]
  • 44aef38: 8327045: Consolidate -fvisibility=hidden as a basic flag for all compilation
  • fcf746d: 8328106: COMPARE_BUILD improvements
  • fadc4b1: 8327423: C2 remove_main_post_loops: check if main-loop belongs to pre-loop, not just assert
  • cff0747: 8326204: yield statements doesn't allow cast expressions with more than 1 type arguments
  • ... and 58 more: https://git.openjdk.org/jdk/compare/0a6e64e2f50cb5eb969dbd0807ad3edc1c353923...master

Your commit was automatically rebased without conflicts.

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

openjdk bot commented Mar 14, 2024

@aivanov-jdk Pushed as commit 3b9255e.

💡 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