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

NPE with ListModelList (with null item) and Selectbox

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: 6.0.0
    • Fix Version/s: 6.0.1
    • Component/s: Components
    • Labels:
      None

      Description

      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.

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                Created:
                Updated:
                Resolved: