[Fix] Parameter.isEqualTo() should not get the value

This commit is contained in:
Robert von Burg 2021-06-10 19:18:17 +02:00
parent 3bae4ace13
commit ad3a22a170
8 changed files with 15 additions and 8 deletions

View File

@ -186,7 +186,8 @@ public abstract class AbstractListParameter<E> extends AbstractParameter<List<E>
@Override
public boolean isEqualTo(Parameter<List<E>> otherValue) {
return this.value.equals(otherValue.getValue());
AbstractListParameter<E> other = (AbstractListParameter<E>) otherValue;
return this.value.equals(other.value);
}
@Override

View File

@ -99,7 +99,8 @@ public class BooleanParameter extends AbstractParameter<Boolean> {
@Override
public boolean isEqualTo(Parameter<Boolean> otherValue) {
return this.value.equals(otherValue.getValue());
BooleanParameter other = (BooleanParameter) otherValue;
return this.value.equals(other.value);
}
@Override

View File

@ -143,7 +143,7 @@ public class DateParameter extends AbstractParameter<Date> {
@Override
public boolean isEqualTo(Parameter<Date> otherValue) {
DateParameter other = (DateParameter) otherValue;
return this.value.equals(other.getValueZdt());
return this.value.equals(other.value);
}
@Override

View File

@ -124,7 +124,8 @@ public class DurationParameter extends AbstractParameter<PeriodDuration> {
@Override
public boolean isEqualTo(Parameter<PeriodDuration> otherValue) {
return this.value.equals(otherValue.getValue());
DurationParameter other = (DurationParameter) otherValue;
return this.value.equals(other.value);
}
@Override

View File

@ -100,7 +100,8 @@ public class FloatParameter extends AbstractParameter<Double> {
@Override
public boolean isEqualTo(Parameter<Double> otherValue) {
return this.value.equals(otherValue.getValue());
FloatParameter other = (FloatParameter) otherValue;
return this.value.equals(other.value);
}
@Override

View File

@ -103,7 +103,8 @@ public class IntegerParameter extends AbstractParameter<Integer> {
@Override
public boolean isEqualTo(Parameter<Integer> otherValue) {
return this.value.equals(otherValue.getValue());
IntegerParameter other = (IntegerParameter) otherValue;
return this.value.equals(other.value);
}
@Override

View File

@ -93,7 +93,8 @@ public class LongParameter extends AbstractParameter<Long> {
@Override
public boolean isEqualTo(Parameter<Long> otherValue) {
return this.value.equals(otherValue.getValue());
LongParameter other = (LongParameter) otherValue;
return this.value.equals(other.value);
}
@Override

View File

@ -132,7 +132,8 @@ public class StringParameter extends AbstractParameter<String> {
@Override
public boolean isEqualTo(Parameter<String> otherValue) {
return this.value.equals(otherValue.getValue());
StringParameter other = (StringParameter) otherValue;
return this.value.equals(other.value);
}
@Override