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

ChangeListener<Integer> cannot be added to SimpleIntegerProperty

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Fix
    • Icon: P4 P4
    • 8
    • 7u9
    • javafx
    • None
    • Win7 64bit

      I'm using 2.2.3-b05. If I create a SimpleBooleanProperty I can assign a ChangeListener<Boolean> to it. If I create a SimpleIntegerProperty I cannot assign a ChangeListener<Integer> as it complaings that there is no suitable method, as ChangeListener<? super Number> does not apply. Instead we need to check and cast Numbers to Integers in the changed() method of the listener.

      If I create a SimpleObjectProperty<Integer> then I can add ChangeListener<Integer> to it without issue.

            msladecek Martin Sládeček
            gcapperjfx Geoff Capper (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported: