RFR: 8087673: [TableView] TableView and TreeTableView menu button overlaps columns when using a constrained resize policy. [v2]

Marius Hanl mhanl at openjdk.org
Tue Aug 30 10:48:14 UTC 2022


On Tue, 30 Aug 2022 09:32:39 GMT, Jose Pereda <jpereda at openjdk.org> wrote:

>> modules/javafx.controls/src/test/java/test/javafx/scene/control/TableViewTest.java line 5883:
>> 
>>> 5881:         assertTrue(thumbMaxX < cornerMinX);
>>> 5882: 
>>> 5883:         sl.dispose();
>> 
>> may be in try/finally to dispose of the StageLoader if test throws an exception?
>
> There are no exceptions expected to happen in these new tests and I don't see that we use try-finally with `StageLoader` by default, is this change really required?

What we usually do is to add a global variable like this:
`private StageLoader stageLoader;`
and in the junit after method something like this:
`if (stageLoader != null) stageLoader.dispose();`

So tests are free to init and use the `stageLoader` and it will always call `dispose()` after the test, no matter if it failed or not.

cc @kleopatra 
see for example: `TableCellTest`

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

PR: https://git.openjdk.org/jfx/pull/886


More information about the openjfx-dev mailing list