RFR: 8315952: Open source several Swing JToolbar JTooltip JTree tests [v2]
Damon Nguyen
dnguyen at openjdk.org
Mon Sep 18 19:30:49 UTC 2023
On Mon, 18 Sep 2023 13:58:18 GMT, Alexey Ivanov <aivanov at openjdk.org> wrote:
>> Damon Nguyen has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Review comments updates
>
> test/jdk/javax/swing/JToolBar/bug4368050.java line 47:
>
>> 45: oos.writeObject(toolBar);
>> 46: byte[] buf = baos.toByteArray();
>> 47: baos.close();
>
> Use try-with-resources to close the streams automatically?
I implemented try-with-resources where I could with the new changes. Thanks!
> test/jdk/javax/swing/JToolBar/bug4465534.java line 39:
>
>> 37: public static void main(String[] args) throws InterruptedException,
>> 38: InvocationTargetException {
>> 39: SwingUtilities.invokeAndWait(() -> {
>
> Safe to run on the main thread.
Same with other tests. Agreed to keep components on the EDT even if test is headless and doesn't _need_ to be on the EDT.
> test/jdk/javax/swing/JToolBar/bug4700351.java line 46:
>
>> 44: InvocationTargetException {
>> 45: SwingUtilities.invokeAndWait(() -> {
>> 46: fr = new JFrame("bug4700351");
>
> Dispose of the frame when the test completes?
Added disposal
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/15755#discussion_r1329181613
PR Review Comment: https://git.openjdk.org/jdk/pull/15755#discussion_r1329183236
PR Review Comment: https://git.openjdk.org/jdk/pull/15755#discussion_r1329181744
More information about the client-libs-dev
mailing list