List<ValidationInfo> () { ValidationInfo urlValidation = CloneDvcsValidationUtils.checkRepositoryURL(myRepositoryUrlCombobox, getCurrentUrlText()); ValidationInfo directoryValidation = CloneDvcsValidationUtils.checkDirectory(myDirectoryField.getText(), myDirectoryField.getTextField()); myTestButton.setEnabled(urlValidation == null); List<ValidationInfo> infoList = new ArrayList<>(); ContainerUtil.addIfNotNull(infoList, myRepositoryTestValidationInfo); ContainerUtil.addIfNotNull(infoList, myCreateDirectoryValidationInfo); ContainerUtil.addIfNotNull(infoList, urlValidation); ContainerUtil.addIfNotNull(infoList, directoryValidation); return infoList; }