void () { if (item == null) { return; } item.setName(myName.getText().trim()); item.setDescription(myDescription.getText().trim()); ListModel<String> model = myActionsList.getModel(); int size = model.getSize(); String[] ids; if (size == 0) { ids = ArrayUtilRt.EMPTY_STRING_ARRAY; } else { ids = new String[size]; for (int i = 0; i < size; i++) { ids[i] = model.getElementAt(i); } } item.setActionIds(ids); }