Fix improperly accessed optional values; ServerDslProperty incorrectly wrapped by OptionalProperty (#1809)

Fixes gh-1808
This commit is contained in:
Artem Makarov
2022-08-19 10:54:58 +02:00
committed by GitHub
parent 08bbdf1a2d
commit c847d1951e
4 changed files with 136 additions and 1 deletions

View File

@@ -54,6 +54,9 @@ public class OptionalProperty implements Serializable, CanBeDynamic {
else if (value instanceof ClientDslProperty) {
return valueToCheck(((ClientDslProperty) value).getClientValue());
}
else if (value instanceof ServerDslProperty) {
return valueToCheck(((ServerDslProperty) value).getServerValue());
}
else if (value instanceof RegexProperty || value instanceof Pattern) {
return new RegexProperty(value).pattern();
}