From 9b2e77903d58b67e861f851767f156f8b341935a Mon Sep 17 00:00:00 2001 From: javanna Date: Fri, 28 Aug 2015 09:41:47 +0200 Subject: [PATCH] Internal: make ValidationException methods final and fix javadocs --- .../org/elasticsearch/common/ValidationException.java | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/core/src/main/java/org/elasticsearch/common/ValidationException.java b/core/src/main/java/org/elasticsearch/common/ValidationException.java index 13288765396..f3fbe5e4bc0 100644 --- a/core/src/main/java/org/elasticsearch/common/ValidationException.java +++ b/core/src/main/java/org/elasticsearch/common/ValidationException.java @@ -36,7 +36,7 @@ public class ValidationException extends IllegalArgumentException { * Add a new validation error to the accumulating validation errors * @param error the error to add */ - public void addValidationError(String error) { + public final void addValidationError(String error) { validationErrors.add(error); } @@ -44,7 +44,7 @@ public class ValidationException extends IllegalArgumentException { * Add a sequence of validation errors to the accumulating validation errors * @param errors the errors to add */ - public void addValidationErrors(Iterable errors) { + public final void addValidationErrors(Iterable errors) { for (String error : errors) { validationErrors.add(error); } @@ -52,14 +52,13 @@ public class ValidationException extends IllegalArgumentException { /** * Returns the validation errors accumulated - * @return */ - public List validationErrors() { + public final List validationErrors() { return validationErrors; } @Override - public String getMessage() { + public final String getMessage() { StringBuilder sb = new StringBuilder(); sb.append("Validation Failed: "); int index = 0;