This discussion is archived
0 Replies Latest reply: Jan 26, 2013 10:50 AM by jkang RSS

Bindings.select(...)  and nulls

jkang Newbie
Currently Being Moderated
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!

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points