Add equals & hashCode into IntWebExchangeBindEx
According Sonar report we need to re-implement `equals()` & `hashCode()` methods in the `IntegrationWebExchangeBindException` since it extends a `WebExchangeBindException` with those methods
This commit is contained in:
@@ -16,6 +16,8 @@
|
||||
|
||||
package org.springframework.integration.http.support;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
import org.springframework.validation.BindingResult;
|
||||
import org.springframework.validation.ObjectError;
|
||||
import org.springframework.web.bind.support.WebExchangeBindException;
|
||||
@@ -62,4 +64,25 @@ public class IntegrationWebExchangeBindException extends WebExchangeBindExceptio
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
if (!(o instanceof IntegrationWebExchangeBindException)) {
|
||||
return false;
|
||||
}
|
||||
if (!super.equals(o)) {
|
||||
return false;
|
||||
}
|
||||
IntegrationWebExchangeBindException that = (IntegrationWebExchangeBindException) o;
|
||||
return Objects.equals(this.endpointId, that.endpointId) &&
|
||||
Objects.equals(this.failedPayload, that.failedPayload);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(super.hashCode(), this.endpointId, this.failedPayload);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user