| Total Complexity | 5 |
| Total Lines | 32 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 0 | ||
| 1 | package io.github.ro4; |
||
| 8 | @SuppressWarnings("all") |
||
| 9 | public class CheckFailedException extends RuntimeException { |
||
| 10 | |||
| 11 | |||
| 12 | private final BindingResult bindingResult; |
||
| 13 | |||
| 14 | 1 | public CheckFailedException(BindingResult bindingResult) { |
|
| 15 | 1 | Assert.notNull(bindingResult, "BindingResult must not be null"); |
|
| 16 | 1 | this.bindingResult = bindingResult; |
|
| 17 | 1 | } |
|
| 18 | |||
| 19 | public final BindingResult getBindingResult() { |
||
| 20 | 1 | return this.bindingResult; |
|
| 21 | } |
||
| 22 | |||
| 23 | |||
| 24 | /** |
||
| 25 | * Returns diagnostic information about the errors held in this object. |
||
| 26 | */ |
||
| 27 | @Override |
||
| 28 | public String getMessage() { |
||
| 29 | 1 | return this.bindingResult.toString(); |
|
| 30 | } |
||
| 31 | |||
| 32 | @Override |
||
| 33 | public boolean equals(@Nullable Object other) { |
||
| 34 | 1 | return (this == other || this.bindingResult.equals(other)); |
|
| 35 | } |
||
| 36 | |||
| 37 | @Override |
||
| 38 | public int hashCode() { |
||
| 39 | 1 | return this.bindingResult.hashCode(); |
|
| 40 | } |
||
| 42 |