Skip to content

Commit 8fac65d

Browse files
committed
throw if method is called
1 parent 89cce56 commit 8fac65d

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

client/rest-high-level/src/main/java/org/elasticsearch/client/Validatable.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,9 @@
2424
public interface Validatable {
2525
ValidationException EMPTY_VALIDATION = new ValidationException() {
2626
@Override
27-
public void addValidationError(String error) { }
27+
public void addValidationError(String error) {
28+
throw new UnsupportedOperationException("Validation messages should not be added to the empty validation");
29+
}
2830
};
2931

3032
/**

0 commit comments

Comments
 (0)