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

ChangeListener<Integer> cannot be added to SimpleIntegerProperty

    XMLWordPrintable

Details

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

    Description

      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.

      Attachments

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved:
                Imported: