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

EventType Creation throws Exception if Duplicate, but no Getter

    Details

    • Subcomponent:
    • CPU:
      generic
    • OS:
      generic

      Description

      A DESCRIPTION OF THE REQUEST :
      EventType throws an exception if an event of the requested name already exists, however there is no alternative mechanism to get a reference to an existing event.

      JUSTIFICATION :
      ControlsFX uses the JavaFX event system. Due to the above limitation, the ControlsFX library can only be initialized in the JVM once. This reduces its ability to work in plugin-based systems.

      For more information, see this ControlsFX support ticket:
      https://bitbucket.org/controlsfx/controlsfx/issues/737/unsafe-eventtype-creation

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      Provide a getter for existing events, or pass back a singleton reference of an event on the second one being requested.
      ACTUAL -
      IllegalArgumentException is thrown. No access to existing event instance is possible.

      ---------- BEGIN SOURCE ----------
      * Use a URLClassLoader to load two jar file libraries - each of which come packaged with a ControlsFX dependency.

      * Attempt to create an event of the same name twice.
      ---------- END SOURCE ----------

      CUSTOMER SUBMITTED WORKAROUND :
      None, other than to avoid it by providing the "JavaFX event using" library as a root-level, shared dependency.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              webbuggrp Webbug Group
            • Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated: