diff --git a/modules/core/src/main/java/org/apache/synapse/mediators/v2/VariableMediator.java b/modules/core/src/main/java/org/apache/synapse/mediators/v2/VariableMediator.java index 997c7032fb..94b0ec8825 100644 --- a/modules/core/src/main/java/org/apache/synapse/mediators/v2/VariableMediator.java +++ b/modules/core/src/main/java/org/apache/synapse/mediators/v2/VariableMediator.java @@ -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;