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

Rony G.Flatscher github.com+60214806+ronyfla at openjdk.java.net
Fri Jun 19 16:04:16 UTC 2020


> This PR adds a "compile" process instruction to FXML files with the optional PI data "true" (default) and "false". The
> PI data is turned into a boolean value using "Boolean.parseBoolean(String)".
> This makes it possible to inject the compile PI everywhere in a FXML file and turn on and off compilation of scripts if
> the scripting engine implements the javax.script.Compilable interface. The PR adds the ability for a fallback in case
> compilation of scripts fails, in which case a warning gets issued about this fact and evaluation of the script will be
> done without compilation. Because of the fallback scripts get compiled with this version by default.
> ---------
> ### Progress
> - [x] Change must not contain extraneous whitespace
> - [x] Commit message must refer to an issue
> - [ ] Change must be properly reviewed
> 
> ### Issue
>  * [JDK-8238080](https://bugs.openjdk.java.net/browse/JDK-8238080): FXMLLoader: if script engines implement
>    javax.script.Compilable compile scripts
> 
> 
> ### Download
> `$ git fetch https://git.openjdk.java.net/jfx pull/192/head:pull/192`
> `$ git checkout pull/192`

Rony G. Flatscher has updated the pull request incrementally with one additional commit since the last revision:

  Incorporating Kevin's review comments (final int, fix for loop test, correct formatting).

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

Changes:
  - all: https://git.openjdk.java.net/jfx/pull/192/files
  - new: https://git.openjdk.java.net/jfx/pull/192/files/7ef1bd68..f2ea3d0e

Webrevs:
 - full: https://webrevs.openjdk.java.net/jfx/192/webrev.03
 - incr: https://webrevs.openjdk.java.net/jfx/192/webrev.02-03

  Stats: 15 lines in 1 file changed: 1 ins; 5 del; 9 mod
  Patch: https://git.openjdk.java.net/jfx/pull/192.diff
  Fetch: git fetch https://git.openjdk.java.net/jfx pull/192/head:pull/192

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


More information about the openjfx-dev mailing list