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

Oliver Kopp duke at openjdk.org
Tue Apr 23 18:23:35 UTC 2024


On Fri, 19 Apr 2024 17:33:39 GMT, Andy Goryachev <angorya at openjdk.org> wrote:

>> I am new to testing in the JFX project. It seems that `test.` is required as package prefix. Thus, I did not use the approach of package-private methods and classes, but needed to make the class and the tested method public.
>> 
>> However, now I get the (expected) error that the module `javafx.graphics` does not export `com.sun.glass.ui.win` to unnamed module @0x1e6454ec.
>> 
>> 
>> class test.com.sun.glass.ui.win.WinTextRangeProviderTest (in unnamed module @0x1e6454ec) cannot access class com.sun.glass.ui.win.WinTextRangeProvider (in module javafx.graphics) because module javafx.graphics does not export com.sun.glass.ui.win to unnamed module @0x1e6454ec
>> java.lang.IllegalAccessError: class test.com.sun.glass.ui.win.WinTextRangeProviderTest (in unnamed module @0x1e6454ec) cannot access class com.sun.glass.ui.win.WinTextRangeProvider (in module javafx.graphics) because module javafx.graphics does not export com.sun.glass.ui.win to unnamed module @0x1e6454ec
>> 	at test.com.sun.glass.ui.win.WinTextRangeProviderTest.getValidStringIndex
>
>> module `javafx.graphics` does not export `com.sun.glass.ui.win` to unnamed module @0x1e6454ec.
> 
> I think you need to add
> 
> --add-exports javafx.graphics/com.sun.glass.ui.win=ALL-UNNAMED
> 
> to graphics/src/test/addExports
> (see line 7)
> 
> @kevinrushforth I wonder if there was a way to auto-generate addExports somehow, at least the part needed for the tests.

@andy-goryachev-oracle I think, I'm finished. (The "tests" requested at https://github.com/openjdk/jfx/pull/1442#issuecomment-2064196119 were IMHO the "simple" unit tests I provided - not some accessibility engine tests)

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

PR Comment: https://git.openjdk.org/jfx/pull/1442#issuecomment-2073091386


More information about the openjfx-dev mailing list