public static ValidationResult create(ValidationResult result) {
    if (result == null) {
      result = SUCCESS;
    }
    return new ValidationResultImpl(result.isValid(), result.getDetail());
  }
Factory method to create a validation result from an existing result (accounts for null).

@param result  the validation result; may be null

@return a new validation result
ambari-server/src/main/java/org/apache/ambari/server/view/validation/ValidationResultImpl.java