Skip to content

Commit

Permalink
[JBPM-10174] Do not call readValue in VariableScope
Browse files Browse the repository at this point in the history
  • Loading branch information
fjtirado committed Jun 1, 2023
1 parent d0b23f9 commit 64bf17e
Showing 1 changed file with 1 addition and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -102,18 +102,13 @@ public Object validateVariable(String processName, String name, Object value) {
}
} else if (value != null) {
DataType type = var.getType();
ObjectDataType obj = new ObjectDataType();
boolean isRightType = type == null || type.verifyDataType(value);
if (!isRightType ) {
if (variableStrictEnabled) {
throw new IllegalArgumentException("Variable '" + name + "' has incorrect data type expected:" + var
.getType().getStringType() + " actual:" + value.getClass().getName());
} else if (value instanceof String) {
if (type.getClass() == obj.getClass()) {
value = type.readValue(value.toString());
} else {
value = type.valueOf(value.toString());
}
value = type.valueOf(value.toString());
}
}
}
Expand Down

0 comments on commit 64bf17e

Please sign in to comment.