@Override public void validateConcreteScmMaterial() { if (url == null || isBlank(url.forDisplay())) { errors().add(URL, "URL cannot be blank"); } if (isNotEmpty(this.password) && isNotEmpty(this.encryptedPassword)) { addError("password", "You may only specify `password` or `encrypted_password`, not both!"); addError("encryptedPassword", "You may only specify `password` or `encrypted_password`, not both!"); } if (isNotEmpty(this.encryptedPassword)) { try { currentPassword(); } catch (Exception e) { addError("encryptedPassword", format("Encrypted password value for svn material with url '%s' is invalid. This usually happens when the cipher text is modified to have an invalid value.", this.getUriForDisplay())); } } }