Skip to content

Conversation

aivanov-jdk
Copy link
Member

@aivanov-jdk aivanov-jdk commented Sep 16, 2025

Code review https://git.openjdk.org/jdk/pull/27197 for JDK-8367348 made me think how to avoid adding more parameters to methods, in particular createInstructionUIPanel. The Builder object captures all the required configuration data, it is the Builder object that should be used to pass the configuration.

This changeset refactors UI creation in PassFailJFrame.

  • The remaining constructor that accepts positional parameters now creates a builder to pass the configuration data.
  • The createInstructionUIPanel method now accepts Builder instead of a set of parameters from it.
  • The createUI method with positional parameters has become redundant and is removed. Code duplication between two versions of createUI is now eliminated.

There are no functional differences. I verified it by launching a few tests which use PassFailJFrame constructors and builder.


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-8367772: Refactor createUI in PassFailJFrame (Bug - P4)

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 27321

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

Using diff file

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

Using Webrev

Link to Webrev Comment

Use builder to pass configuration parameters even when
a PassFailJFrame constructor is used.
@bridgekeeper
Copy link

bridgekeeper bot commented Sep 16, 2025

👋 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
Copy link

openjdk bot commented Sep 16, 2025

❗ This change is not yet ready to be integrated.
See the Progress checklist in the description for automated requirements.

@openjdk
Copy link

openjdk bot commented Sep 16, 2025

@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 client [email protected] rfr Pull request is ready for review labels Sep 16, 2025
@mlbridge
Copy link

mlbridge bot commented Sep 16, 2025

Webrevs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
client [email protected] rfr Pull request is ready for review
Development

Successfully merging this pull request may close these issues.

1 participant