@Nullable public String editComment(@NotNull final String fromName, final String newComment) { final LocalChangeList list = myMap.get(fromName); if (list != null) { final String oldComment = list.getComment(); if (!Comparing.equal(oldComment, newComment)) { final LocalChangeListImpl listImpl = (LocalChangeListImpl) list; listImpl.setCommentImpl(newComment); final ChangeListEditHandler editHandler = listImpl.getEditHandler(); if (editHandler != null) { listImpl.setNameImpl( editHandler.changeNameOnChangeComment(listImpl.getName(), listImpl.getComment())); if (!fromName.equals(listImpl.getName())) { myMap.remove(fromName); myMap.put(listImpl.getName(), list); } } } return oldComment; } return null; }