mirror of
https://github.com/github/codeql.git
synced 2026-04-30 11:15:13 +02:00
Remove unnecessary code from stubs
This commit is contained in:
@@ -19,16 +19,7 @@ package org.springframework.validation;
|
||||
import org.springframework.lang.Nullable;
|
||||
|
||||
public class FieldError extends ObjectError {
|
||||
|
||||
private final String field;
|
||||
|
||||
@Nullable private final Object rejectedValue;
|
||||
|
||||
private final boolean bindingFailure;
|
||||
|
||||
public FieldError(String objectName, String field, String defaultMessage) {
|
||||
this(objectName, field, null, false, null, null, defaultMessage);
|
||||
}
|
||||
public FieldError(String objectName, String field, String defaultMessage) { super("", ""); }
|
||||
|
||||
public FieldError(
|
||||
String objectName,
|
||||
@@ -37,12 +28,7 @@ public class FieldError extends ObjectError {
|
||||
boolean bindingFailure,
|
||||
@Nullable String[] codes,
|
||||
@Nullable Object[] arguments,
|
||||
@Nullable String defaultMessage) {
|
||||
super(objectName, "");
|
||||
this.field = field;
|
||||
this.rejectedValue = rejectedValue;
|
||||
this.bindingFailure = bindingFailure;
|
||||
}
|
||||
@Nullable String defaultMessage) { super("", ""); }
|
||||
|
||||
public String getField() {
|
||||
return null;
|
||||
|
||||
@@ -21,22 +21,13 @@ import org.springframework.lang.Nullable;
|
||||
|
||||
public class ObjectError extends DefaultMessageSourceResolvable {
|
||||
|
||||
private final String objectName;
|
||||
|
||||
@Nullable private transient Object source;
|
||||
|
||||
public ObjectError(String objectName, String defaultMessage) {
|
||||
super("");
|
||||
this.objectName = objectName;
|
||||
}
|
||||
public ObjectError(String objectName, String defaultMessage) { super(""); }
|
||||
|
||||
public ObjectError(
|
||||
String objectName,
|
||||
@Nullable String[] codes,
|
||||
@Nullable Object[] arguments,
|
||||
@Nullable String defaultMessage) {
|
||||
this(objectName, defaultMessage);
|
||||
}
|
||||
@Nullable String defaultMessage) { super(""); }
|
||||
|
||||
public String getObjectName() {
|
||||
return null;
|
||||
@@ -54,23 +45,16 @@ public class ObjectError extends DefaultMessageSourceResolvable {
|
||||
|
||||
@Override
|
||||
public boolean equals(@Nullable Object other) {
|
||||
if (this == other) {
|
||||
return true;
|
||||
}
|
||||
if (other == null || other.getClass() != getClass() || !super.equals(other)) {
|
||||
return false;
|
||||
}
|
||||
ObjectError otherError = (ObjectError) other;
|
||||
return getObjectName().equals(otherError.getObjectName());
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return (29 * super.hashCode() + getObjectName().hashCode());
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "Error in object '" + this.objectName + "': " + resolvableToString();
|
||||
return "";
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user