fixes for #483: Quantity subclasses copy() functions not all transferring values
This commit is contained in:
parent
53ea22cae7
commit
898665f356
|
@ -115,6 +115,12 @@ public class Money extends Quantity implements ICompositeType {
|
|||
public Money copy() {
|
||||
Money dst = new Money();
|
||||
copyValues(dst);
|
||||
dst.value = value == null ? null : value.copy();
|
||||
dst.comparator = comparator == null ? null : comparator.copy();
|
||||
dst.unit = unit == null ? null : unit.copy();
|
||||
dst.system = system == null ? null : system.copy();
|
||||
dst.code = code == null ? null : code.copy();
|
||||
|
||||
return dst;
|
||||
}
|
||||
|
||||
|
|
|
@ -54,11 +54,6 @@ public class MoneyQuantity extends Quantity {
|
|||
|
||||
public void copyValues(MoneyQuantity dst) {
|
||||
super.copyValues(dst);
|
||||
dst.value = value == null ? null : value.copy();
|
||||
dst.comparator = comparator == null ? null : comparator.copy();
|
||||
dst.unit = unit == null ? null : unit.copy();
|
||||
dst.system = system == null ? null : system.copy();
|
||||
dst.code = code == null ? null : code.copy();
|
||||
}
|
||||
|
||||
protected MoneyQuantity typedCopy() {
|
||||
|
|
|
@ -53,12 +53,7 @@ public class SimpleQuantity extends Quantity {
|
|||
}
|
||||
|
||||
public void copyValues(SimpleQuantity dst) {
|
||||
super.copyValues(dst);
|
||||
dst.value = value == null ? null : value.copy();
|
||||
dst.comparator = comparator == null ? null : comparator.copy();
|
||||
dst.unit = unit == null ? null : unit.copy();
|
||||
dst.system = system == null ? null : system.copy();
|
||||
dst.code = code == null ? null : code.copy();
|
||||
super.copyValues(dst);
|
||||
}
|
||||
|
||||
protected SimpleQuantity typedCopy() {
|
||||
|
|
|
@ -53,11 +53,6 @@ public class MoneyQuantity extends Quantity {
|
|||
|
||||
public void copyValues(MoneyQuantity dst) {
|
||||
super.copyValues(dst);
|
||||
dst.value = value == null ? null : value.copy();
|
||||
dst.comparator = comparator == null ? null : comparator.copy();
|
||||
dst.unit = unit == null ? null : unit.copy();
|
||||
dst.system = system == null ? null : system.copy();
|
||||
dst.code = code == null ? null : code.copy();
|
||||
}
|
||||
|
||||
protected MoneyQuantity typedCopy() {
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -53,11 +53,6 @@ public class SimpleQuantity extends Quantity {
|
|||
|
||||
public void copyValues(SimpleQuantity dst) {
|
||||
super.copyValues(dst);
|
||||
dst.value = value == null ? null : value.copy();
|
||||
dst.comparator = comparator == null ? null : comparator.copy();
|
||||
dst.unit = unit == null ? null : unit.copy();
|
||||
dst.system = system == null ? null : system.copy();
|
||||
dst.code = code == null ? null : code.copy();
|
||||
}
|
||||
|
||||
protected SimpleQuantity typedCopy() {
|
||||
|
|
Loading…
Reference in New Issue