Skip to content

Commit

Permalink
constraints handling improved
Browse files Browse the repository at this point in the history
  • Loading branch information
miho committed Aug 14, 2024
1 parent 009a5ee commit f8d515a
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -482,8 +482,11 @@ private void addConstraint(Property property, Map<String, Object> propertySchema
return;
}

var constraintName = constraint.split("=")[0];
var constraintValue = constraint.split("=")[1];
// split at first occurrence of "=", so that we can have values with "=" in them
var constraintSplit = constraint.split("=", 2);

var constraintName = constraintSplit[0];
var constraintValue = constraintSplit[1];

if (constraintName != null && constraintValue != null
&& !constraintName.isBlank() && !constraintValue.isBlank()) {
Expand Down

0 comments on commit f8d515a

Please sign in to comment.