Skip to content

Commit

Permalink
Merge pull request #2251 from SanojPunchihewa/var-fix
Browse files Browse the repository at this point in the history
Update data type handling in variable mediator
  • Loading branch information
GDLMadushanka authored Dec 5, 2024
2 parents c409c33 + 696b298 commit a643f34
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -249,34 +249,42 @@ private Object convertExpressionResult(Object evaluatedValue, String type) {
if (!(evaluatedValue instanceof Boolean)) {
handleDataTypeException("BOOLEAN");
}
break;
case DOUBLE:
if (!(evaluatedValue instanceof Double)) {
handleDataTypeException("DOUBLE");
}
break;
case FLOAT:
if (!(evaluatedValue instanceof Float)) {
handleDataTypeException("FLOAT");
}
break;
case INTEGER:
if (!(evaluatedValue instanceof Integer)) {
handleDataTypeException("INTEGER");
}
break;
case LONG:
if (!(evaluatedValue instanceof Long)) {
handleDataTypeException("LONG");
}
break;
case OM:
if (!(evaluatedValue instanceof OMElement)) {
handleDataTypeException("OM");
}
break;
case SHORT:
if (!(evaluatedValue instanceof Short)) {
handleDataTypeException("SHORT");
}
break;
case JSON:
if (!(evaluatedValue instanceof JsonElement)) {
handleDataTypeException("JSON");
}
break;
default:
}
return evaluatedValue;
Expand Down

0 comments on commit a643f34

Please sign in to comment.