RFR: 8238080: FXMLLoader: if script engines implement javax.script.Compilable compile scripts [v3]

Kevin Rushforth kcr at openjdk.java.net
Fri Jun 19 16:10:23 UTC 2020

On Fri, 19 Jun 2020 15:49:36 GMT, Rony G. Flatscher <github.com+60214806+ronyfla at openjdk.org> wrote:

>> modules/javafx.fxml/src/main/java/javafx/fxml/FXMLLoader.java line 1769:
>>> 1768:             try {
>>> 1769:                 if (isCompiled) {
>>> 1770:                    compiledScript.eval(localBindings);
>> I think there may be other places you need to set isCompiled (it isn't set in the first couple of methods where you
>> compile scripts). Can you check this?
> isCompiled gets set explicitly to false at object creation time. It only will be changed to true, if the script was
> successfully compiled.

I was (mistakenly) thinking of the `processStartElement` and `processEndElement` methods of the `ScriptElement` class,
but that's a different class, and they use a local `compiledScript` variable. So this is fine.


PR: https://git.openjdk.java.net/jfx/pull/192

More information about the openjfx-dev mailing list