[Minor] Replace ListParameter values on setValue()
This commit is contained in:
parent
fa9d0afacf
commit
ea81b26916
|
@ -88,11 +88,7 @@ public class FloatListParameter extends AbstractParameter<List<Double>> implemen
|
|||
public void setValue(List<Double> value) {
|
||||
assertNotReadonly();
|
||||
validateValue(value);
|
||||
if (this.value == null) {
|
||||
this.value = new ArrayList<>(value.size());
|
||||
}
|
||||
this.value.clear();
|
||||
this.value.addAll(value);
|
||||
this.value = new ArrayList<>(value.size());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -88,11 +88,7 @@ public class IntegerListParameter extends AbstractParameter<List<Integer>> imple
|
|||
public void setValue(List<Integer> value) {
|
||||
assertNotReadonly();
|
||||
validateValue(value);
|
||||
if (this.value == null) {
|
||||
this.value = new ArrayList<>(value.size());
|
||||
}
|
||||
this.value.clear();
|
||||
this.value.addAll(value);
|
||||
this.value = new ArrayList<>(value.size());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -88,11 +88,7 @@ public class LongListParameter extends AbstractParameter<List<Long>> implements
|
|||
public void setValue(List<Long> value) {
|
||||
assertNotReadonly();
|
||||
validateValue(value);
|
||||
if (this.value == null) {
|
||||
this.value = new ArrayList<>(value.size());
|
||||
}
|
||||
this.value.clear();
|
||||
this.value.addAll(value);
|
||||
this.value = new ArrayList<>(value.size());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -88,11 +88,7 @@ public class StringListParameter extends AbstractParameter<List<String>> impleme
|
|||
public void setValue(List<String> value) {
|
||||
assertNotReadonly();
|
||||
validateValue(value);
|
||||
if (this.value == null) {
|
||||
this.value = new ArrayList<>(value.size());
|
||||
}
|
||||
this.value.clear();
|
||||
this.value.addAll(value);
|
||||
this.value = new ArrayList<>(value.size());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Reference in New Issue