0 Replies Latest reply: Jan 26, 2013 12:50 PM by jkang RSS

    Bindings.select(...)  and nulls

    jkang
      When using Bindings.select(ObservableValue<?> root,String... steps) is it ok to have ObjectProperty with value null as root?

      In JavaFX 2.2 (JDK7) it seems to be ok, but JDK8 latest EA release logs warnings about NullPointerException.

      jan 25, 2013 8:49:20 PM com.sun.javafx.binding.SelectBinding$SelectBindingHelper getObservableValue
      WARNING: Property 'selectedItem' in ObjectProperty [bound, value: null] is null
      java.lang.NullPointerException
           at com.sun.javafx.binding.SelectBinding$SelectBindingHelper.getObservableValue(SelectBinding.java:435)
           at com.sun.javafx.binding.SelectBinding$SelectBindingHelper.access$200(SelectBinding.java:384)
           at com.sun.javafx.binding.SelectBinding$AsObject.computeValue(SelectBinding.java:85)

      Thanks!