On Mon, 11 Mar 2024 21:18:40 GMT, Alexey Ivanov <[email protected]> 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.

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

-------------

Marked as reviewed by honkar (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/18206#pullrequestreview-1931674713

Reply via email to