Adding blank case for ExpressionNode.toString() in r4 and r5. (#609)
This commit is contained in:
parent
ad18e131d8
commit
72b7300700
|
@ -1 +1,2 @@
|
|||
* https://github.com/hapifhir/org.hl7.fhir.core/issues/499
|
||||
* https://github.com/hapifhir/org.hl7.fhir.core/issues/602
|
||||
|
|
|
@ -349,25 +349,28 @@ public class ExpressionNode {
|
|||
b.append(", ");
|
||||
b.append(n.toString());
|
||||
}
|
||||
if (function == Function.Item)
|
||||
if (function == Function.Item) {
|
||||
b.append("]");
|
||||
else {
|
||||
} else {
|
||||
b.append(")");
|
||||
}
|
||||
break;
|
||||
case Constant:
|
||||
if (constant instanceof StringType)
|
||||
b.append("'"+Utilities.escapeJson(constant.primitiveValue())+"'");
|
||||
else if (constant instanceof Quantity) {
|
||||
if (constant == null) {
|
||||
b.append("{}");
|
||||
} else if (constant instanceof StringType) {
|
||||
b.append("'" + Utilities.escapeJson(constant.primitiveValue()) + "'");
|
||||
} else if (constant instanceof Quantity) {
|
||||
Quantity q = (Quantity) constant;
|
||||
b.append(Utilities.escapeJson(q.getValue().toPlainString()));
|
||||
b.append(" '");
|
||||
b.append(Utilities.escapeJson(q.getUnit()));
|
||||
b.append("'");
|
||||
} else if (constant.primitiveValue() != null)
|
||||
} else if (constant.primitiveValue() != null) {
|
||||
b.append(Utilities.escapeJson(constant.primitiveValue()));
|
||||
else
|
||||
} else {
|
||||
b.append(Utilities.escapeJson(constant.toString()));
|
||||
}
|
||||
break;
|
||||
case Group:
|
||||
b.append("(");
|
||||
|
|
|
@ -395,25 +395,28 @@ public class ExpressionNode {
|
|||
b.append(", ");
|
||||
b.append(n.toString());
|
||||
}
|
||||
if (function == Function.Item)
|
||||
if (function == Function.Item) {
|
||||
b.append("]");
|
||||
else {
|
||||
} else {
|
||||
b.append(")");
|
||||
}
|
||||
break;
|
||||
case Constant:
|
||||
if (constant instanceof StringType)
|
||||
b.append("'"+Utilities.escapeJson(constant.primitiveValue())+"'");
|
||||
else if (constant instanceof Quantity) {
|
||||
if (constant == null) {
|
||||
b.append("{}");
|
||||
} else if (constant instanceof StringType) {
|
||||
b.append("'" + Utilities.escapeJson(constant.primitiveValue()) + "'");
|
||||
} else if (constant instanceof Quantity) {
|
||||
Quantity q = (Quantity) constant;
|
||||
b.append(Utilities.escapeJson(q.getValue().toPlainString()));
|
||||
b.append(" '");
|
||||
b.append(Utilities.escapeJson(q.getUnit()));
|
||||
b.append("'");
|
||||
} else if (constant.primitiveValue() != null)
|
||||
} else if (constant.primitiveValue() != null) {
|
||||
b.append(Utilities.escapeJson(constant.primitiveValue()));
|
||||
else
|
||||
} else {
|
||||
b.append(Utilities.escapeJson(constant.toString()));
|
||||
}
|
||||
break;
|
||||
case Group:
|
||||
b.append("(");
|
||||
|
|
Loading…
Reference in New Issue