Skip to content

Commit

Permalink
constraints should use actual argument type, was not working for bool…
Browse files Browse the repository at this point in the history
…ean vs string
  • Loading branch information
miho committed Aug 13, 2024
1 parent b5d428b commit 009a5ee
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -497,7 +497,10 @@ private void addConstraint(Property property, Map<String, Object> propertySchema
constraintValueToWrite = Double.parseDouble(constraintValue);
} catch (NumberFormatException e2) {
try {
constraintValueToWrite = Boolean.parseBoolean(constraintValue);
if(constraintValue.equalsIgnoreCase("true")
|| constraintValue.equalsIgnoreCase("false")) {
constraintValueToWrite = Boolean.parseBoolean(constraintValue);
}
} catch (NumberFormatException e3) {
// ignore, not possible to convert to boolean, integer or double, we assume string
}
Expand Down

0 comments on commit 009a5ee

Please sign in to comment.