summary |
shortlog |
log |
commit | commitdiff |
review |
tree
raw |
patch |
inline | side by side (from parent 1:
16a6ce0)
Signed-off-by: Vasyl Razinkov <vasyl.razinkov@est.tech>
Change-Id: I3b52c720968ab8333fa2ec81b13c3d0e7b2f4316
Issue-ID: SDC-4299
}
protected void initialize(String rawTextValue, ToscaType propertyType) throws ConstraintValueDoNotMatchPropertyTypeException {
}
protected void initialize(String rawTextValue, ToscaType propertyType) throws ConstraintValueDoNotMatchPropertyTypeException {
- // Perform verification that the property type is supported for
-
- // comparison
+ // Perform verification that the property type is supported for comparison
ConstraintUtil.checkComparableType(propertyType);
// Check if the text value is valid for the property type
if (propertyType.isValidValue(rawTextValue)) {
ConstraintUtil.checkComparableType(propertyType);
// Check if the text value is valid for the property type
if (propertyType.isValidValue(rawTextValue)) {
* @throws ConstraintValueDoNotMatchPropertyTypeException if the property type cannot be compared
*/
public static void checkComparableType(ToscaType propertyType) throws ConstraintValueDoNotMatchPropertyTypeException {
* @throws ConstraintValueDoNotMatchPropertyTypeException if the property type cannot be compared
*/
public static void checkComparableType(ToscaType propertyType) throws ConstraintValueDoNotMatchPropertyTypeException {
- // The validity of the value is already assured by us with our
-
- // ToscaType.convert() method
-
- // here we just want to check that the constraint is not used on
-
- // unsupported type as boolean
+ // The validity of the value is already assured by us with our ToscaType.convert() method
+ // here we just want to check that the constraint is not used on unsupported type as boolean
switch (propertyType) {
case FLOAT:
case INTEGER:
case TIMESTAMP:
case VERSION:
switch (propertyType) {
case FLOAT:
case INTEGER:
case TIMESTAMP:
case VERSION:
case BOOLEAN:
throw new ConstraintValueDoNotMatchPropertyTypeException("Constraint is invalid for property type <" + propertyType.toString() + ">");
default:
case BOOLEAN:
throw new ConstraintValueDoNotMatchPropertyTypeException("Constraint is invalid for property type <" + propertyType.toString() + ">");
default: