Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8124851

No version checking when loading FXML file

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • 8
    • 7u6
    • javafx
    • None

      There is no version checking when loading FXML file and incompatible FXML version could be loaded and fail.

      I propose to use one namespace more in root element, that would be xmlns="http://javafx.com/javafx", which would be default namespace without any prefix.

      Those two namespaces do not say much about actual version so version would be appended to them:

      xmlns:fx="http://javafx.com/fxml/1" xmlns="http://javafx.com/javafx/2"

      First namespace would probably stay with version 1 long time since it defines fx: prefixed elements and attributes that are part of FXML format definition itself and it doesn't seem to be changing much.

      The other namespace would be used solely for versioning purposes of JavaFX API itself used in particular FXML file. It means that curent version would be 2 and next version would be 8. It implies that compatibility along one version 2.x.x or 8.x.x is satisfied. Also it implies that JavaFX releases are backward compatible, so the check would be just for loading newer version with older runtime. Which would require to *fix current 2.2.x codebase to do this checking*. And of course that Scene Builder will write the version of the namespace to the FXML file.

            ekrejcir Eva Krejčířová (Inactive)
            mkubec Milan Kubec
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported: