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

Internal PlatformImpl.startup method should throw ISE if already started

    Details

    • Type: Bug
    • Status: Open
    • Priority: P4
    • Resolution: Unresolved
    • Affects Version/s: 9
    • Fix Version/s: tbd
    • Component/s: javafx
    • Labels:
      None

      Description

      This is a follow-up to JDK-8090585, which provided a public Platform.startup method to start the JavaFX platform. The new public method is documented to throw an IllegalStateException if the platform is already running. The existing internal PlatformImpl.startup method has a different semantic, whereby it turns a call to startup into a runLater if the platform is already running. In order to minimize the risk to existing code, and to SQE tests, we left the current semantic alone for code that calls the internal method directly. We should unify the semantics to avoid confusion such that all uses of this method throw ISE when the platform is already running.

      At least the JFXPanel() and FXCanvas initialization code needs to change to only call Platform.startup once (and JFXPanel will likely need to call it in a try/catch block, since the platform might already be running).

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                kcr Kevin Rushforth
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated: