RFR: 8330462: StringIndexOutOfBoundException when typing anything into TextField [v15]

Kevin Rushforth kcr at openjdk.org
Wed Apr 24 15:28:36 UTC 2024


On Tue, 23 Apr 2024 19:00:49 GMT, Andy Goryachev <angorya at openjdk.org> wrote:

>> tests/system/src/test/java/test/com/sun/glass/ui/win/WinTextRangeProviderTest.java line 48:
>> 
>>> 46: import static org.junit.jupiter.api.Assertions.assertEquals;
>>> 47: 
>>> 48: @EnabledOnOs({OS.WINDOWS})
>> 
>> I did not use `Platform`s OS detection, because this seems to be more resource friendly and native JUnit5. I can switch to the style of `test.com.sun.glass.ui.gtk.Gtk2RemovalCommon`, i.e., use `if (!PlatformUtil.isWindows()) return;` in all test methdos.
>
> Interesting = @kevinrushforth what do you think?

An excellent question. If it is robust, then it seems OK. Using Junit5 Assumptions is more flexible, though, so might lean toward wanting to use that. Either way, test this on the other platforms to ensure that the test is skipped (and marked as skipped in the report).

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

PR Review Comment: https://git.openjdk.org/jfx/pull/1442#discussion_r1578085887


More information about the openjfx-dev mailing list