RFR: 8284535 : Fix PrintLatinCJKTest.java test that is failing with Parse Exception [v5]
lawrence.andrews
duke at openjdk.java.net
Thu Apr 7 15:09:28 UTC 2022
On Wed, 6 Apr 2022 10:39:44 GMT, Alexey Ivanov <aivanov at openjdk.org> wrote:
>> lawrence.andrews has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Fixed review comments
>
> test/jdk/java/awt/print/PrinterJob/PrintLatinCJKTest.java line 85:
>
>> 83: frame.dispose();
>> 84: }
>> 85: });
>
> I just thought whether it's feasible to keep a list of frames / windows to be disposed of inside the `PassFailJFrame` class. It disposes of its instruction frame when the wait is over, it can handle disposing of other frames too.
>
> If I remember correctly, the first version disposed of of all windows. If we make it an explicit list, it shouldn't cause issues.
Fixed
> test/jdk/java/awt/print/PrinterJob/PrintLatinCJKTest.java line 105:
>
>> 103: PrintLatinCJKTest.showFrame();
>> 104: passFailJFrame.awaitAndCheck();
>> 105: PrintLatinCJKTest.disposeTestFrame();
>
> It won't be disposed of if the test fails, that is throws an exception, so this should be in try-finally block.
>
> The class name isn't required to call a static method which is in this class.
Fixed
-------------
PR: https://git.openjdk.java.net/jdk/pull/7966
More information about the client-libs-dev
mailing list