Uploaded image for project: 'ZK'
  1. ZK
  2. ZK-1031

NPE with ListModelList (with null item) and Selectbox

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Normal Normal
    • 6.0.1
    • 6.0.0
    • Components
    • None

      Using a selectbox with ListModelList, and having the first item on the list a null object, when users select this 1st element, NPE happens.

      public boolean isSelected(Object obj) {
      return !isSelectionEmpty() && (_selection.size() == 1 ? _selection.iterator().next().equals(obj) : _selection.contains(obj));
      }

      The problem is _selection.iterator().next() -> here it's a null object, can't call equals(obj) on it.

            benbai benbai
            madruga0315 madruga0315
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: