private void update(@NotNull JList<?> list) {
    Object selectedItem = list.getSelectedValue();
    T item = ObjectUtils.tryCast(selectedItem, myClass);
    if (item != null) {
      update(item);
    }
  }
private void update(@NotNull JList<?> list)