Integrated: 8325851: Hide PassFailJFrame.Builder constructor
Alexey Ivanov
aivanov at openjdk.org
Thu Mar 14 11:00:45 UTC 2024
On Mon, 11 Mar 2024 21:18:40 GMT, Alexey Ivanov <aivanov at openjdk.org> wrote:
> 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.
This pull request has now been integrated.
Changeset: 3b9255eb
Author: Alexey Ivanov <aivanov at openjdk.org>
URL: https://git.openjdk.org/jdk/commit/3b9255eb663b4c90aa5cec89f0d9380ef8eba49e
Stats: 242 lines in 21 files changed: 14 ins; 118 del; 110 mod
8325851: Hide PassFailJFrame.Builder constructor
Reviewed-by: honkar, prr
-------------
PR: https://git.openjdk.org/jdk/pull/18206
More information about the client-libs-dev
mailing list