summaryrefslogtreecommitdiffstats
path: root/catalog-model/src
diff options
context:
space:
mode:
Diffstat (limited to 'catalog-model/src')
-rw-r--r--catalog-model/src/main/java/org/openecomp/sdc/be/model/tosca/constraints/AbstractComparablePropertyConstraint.java4
-rw-r--r--catalog-model/src/main/java/org/openecomp/sdc/be/model/tosca/constraints/ConstraintUtil.java11
2 files changed, 4 insertions, 11 deletions
diff --git a/catalog-model/src/main/java/org/openecomp/sdc/be/model/tosca/constraints/AbstractComparablePropertyConstraint.java b/catalog-model/src/main/java/org/openecomp/sdc/be/model/tosca/constraints/AbstractComparablePropertyConstraint.java
index e7730bd612..d7eb6e69c6 100644
--- a/catalog-model/src/main/java/org/openecomp/sdc/be/model/tosca/constraints/AbstractComparablePropertyConstraint.java
+++ b/catalog-model/src/main/java/org/openecomp/sdc/be/model/tosca/constraints/AbstractComparablePropertyConstraint.java
@@ -33,9 +33,7 @@ public abstract class AbstractComparablePropertyConstraint extends AbstractPrope
}
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)) {
diff --git a/catalog-model/src/main/java/org/openecomp/sdc/be/model/tosca/constraints/ConstraintUtil.java b/catalog-model/src/main/java/org/openecomp/sdc/be/model/tosca/constraints/ConstraintUtil.java
index 74a9359f2a..1b9b94eb61 100644
--- a/catalog-model/src/main/java/org/openecomp/sdc/be/model/tosca/constraints/ConstraintUtil.java
+++ b/catalog-model/src/main/java/org/openecomp/sdc/be/model/tosca/constraints/ConstraintUtil.java
@@ -60,20 +60,15 @@ public final class ConstraintUtil {
* @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:
- break;
case STRING:
+ break;
case BOOLEAN:
throw new ConstraintValueDoNotMatchPropertyTypeException("Constraint is invalid for property type <" + propertyType.toString() + ">");
default: