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

NPE when setting Button.setDefault(true)

XMLWordPrintable

      I invoked Button.setDefault(true) and got the exception below. I think the code of ButtonSkin might be a bit too optimistic thinking no input parameters could be null...


      Caused by: java.lang.NullPointerException
      at com.sun.javafx.scene.control.skin.ButtonSkin.setDefaultButton(ButtonSkin.java:141)
      at com.sun.javafx.scene.control.skin.ButtonSkin.handleControlPropertyChanged(ButtonSkin.java:74)
      at com.sun.javafx.scene.control.skin.SkinBase$3.changed(SkinBase.java:282)
      at javafx.beans.value.WeakChangeListener.changed(WeakChangeListener.java:107)
      at com.sun.javafx.binding.ExpressionHelper$SingleChange.fireValueChangedEvent(ExpressionHelper.java:196)
      at com.sun.javafx.binding.ExpressionHelper.fireValueChangedEvent(ExpressionHelper.java:100)
      at javafx.beans.property.BooleanPropertyBase.fireValueChangedEvent(BooleanPropertyBase.java:121)
      at javafx.beans.property.BooleanPropertyBase.markInvalid(BooleanPropertyBase.java:128)
      at javafx.beans.property.BooleanPropertyBase.set(BooleanPropertyBase.java:161)
      at javafx.scene.control.Button.setDefaultButton(Button.java:109)
      at com.wefend.pc.install.AbstractInstallStep.<init>(AbstractInstallStep.java:37)
      at com.wefend.pc.install.LanguageStep.<init>(LanguageStep.java:67)
      at com.wefend.pc.install.InstallPane.<init>(InstallPane.java:56)
      at com.wefend.pc.WefendPc.initializeStage(WefendPc.java:91)

            miflemi Mick Fleming
            risaksen Randahl Isaksen
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported: