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

Andy Goryachev angorya at openjdk.org
Wed Apr 24 14:38:37 UTC 2024


On Wed, 24 Apr 2024 07:45:40 GMT, Oliver Kopp <duke at openjdk.org> wrote:

>> Please replace tests/system/src/test/.classpath with this:
>> 
>> 
>> <?xml version="1.0" encoding="UTF-8"?>
>> <classpath>
>> 	<classpathentry combineaccessrules="false" kind="src" path="/swing">
>> 		<attributes>
>> 			<attribute name="module" value="true"/>
>> 		</attributes>
>> 	</classpathentry>
>> 	<classpathentry combineaccessrules="false" kind="src" path="/base">
>> 		<attributes>
>> 			<attribute name="module" value="true"/>
>> 			<attribute name="add-exports" value="javafx.base/com.sun.javafx=ALL-UNNAMED:javafx.base/test.util.memory=ALL-UNNAMED"/>
>> 		</attributes>
>> 	</classpathentry>
>> 	<classpathentry combineaccessrules="false" kind="src" path="/graphics">
>> 		<attributes>
>> 			<attribute name="module" value="true"/>
>> 			<attribute name="add-exports" value="javafx.graphics/com.sun.glass.ui=ALL-UNNAMED:javafx.graphics/com.sun.glass.ui.monocle=ALL-UNNAMED:javafx.graphics/com.sun.javafx.sg.prism=ALL-UNNAMED:javafx.graphics/com.sun.prism.impl=ALL-UNNAMED:javafx.graphics/com.sun.javafx.image.impl=ALL-UNNAMED:javafx.graphics/com.sun.glass.events=ALL-UNNAMED:javafx.graphics/com.sun.javafx.application=ALL-UNNAMED:javafx.graphics/com.sun.javafx.css=ALL-UNNAMED:javafx.graphics/com.sun.javafx.geom=ALL-UNNAMED:javafx.graphics/com.sun.javafx.tk=ALL-UNNAMED:javafx.graphics/com.sun.glass.ui.mac=ALL-UNNAMED:javafx.graphics/com.sun.glass.ui.win=ALL-UNNAMED:javafx.graphics/com.sun.javafx.scene.text=ALL-UNNAMED:javafx.graphics/com.sun.javafx.text=ALL-UNNAMED:javafx.graphics/com.sun.javafx.font=ALL-UNNAMED"/>
>> 		</attributes>
>> 	</classpathentry>
>> 	<classpathentry combineaccessrules="false" kind="src" path="/controls">
>> 		<attributes>
>> 			<attribute name="module" value="true"/>
>> 			<attribute name="add-exports" value="javafx.controls/test.com.sun.javafx.scene.control.infrastructure=ALL-UNNAMED:javafx.controls/com.sun.javafx.scene.control=ALL-UNNAMED"/>
>> 		</attributes>
>> 	</classpathentry>
>> 	<classpathentry combineaccessrules="false" kind="src" path="/fxml">
>> 		<attributes>
>> 			<attribute name="module" value="true"/>
>> 		</attributes>
>> 	</classpathentry>
>> 	<classpathentry combineaccessrules="false" kind="src" path="/web">
>> 		<attributes>
>> 			<attribute name="module" value="true"/>
>> 			<attribute name="add-exports" value="javafx.web/com.sun.webkit=ALL-UNNAMED"/>
>> 		</attributes>
>> 	</classpathentry>
>> 	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER">
>> 		<attributes>
>> 			<attribute name="module" value="true"/>
>> 			<attribute name="...
>
> Done.
> 
> I opened the project in Eclipse (instead of IntelliJ). How can I run the test in Eclipse?
> 
> A simple "run" does not work, because the output is then:
> 
> 
> WARNING: Unknown module: javafx.base specified to --patch-module
> WARNING: Unknown module: javafx.web specified to --patch-module
> WARNING: Unknown module: javafx.controls specified to --patch-module
> WARNING: Unknown module: javafx.graphics specified to --patch-module
> 
> 
> How do I need to modify the JUnit "run configuration" inside Eclipse?

Yes, running tests in eclipse requires a bit of set up.  First run the (new) test with  the usual 'Run', this creates a run configuration (should appear under 'JUnit').  Then open that via main menu Run -> Run Configurations... , select "Dependencies" tab, click on "Override Dependencies" button and then the pain starts.

Depending on the type of test, you'd need to either replace or append various `--add-exports`, `--add-modules`, `-Djava.library.path=`, and `-Djavafx.toolkit= `

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

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


More information about the openjfx-dev mailing list