diff options
Diffstat (limited to 'common/onap-tosca-datatype/src/main/java/org/onap')
-rw-r--r-- | common/onap-tosca-datatype/src/main/java/org/onap/sdc/tosca/datatypes/model/ScalarUnitValidator.java | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/common/onap-tosca-datatype/src/main/java/org/onap/sdc/tosca/datatypes/model/ScalarUnitValidator.java b/common/onap-tosca-datatype/src/main/java/org/onap/sdc/tosca/datatypes/model/ScalarUnitValidator.java index d7e538e0a7..5e2e2e5ee7 100644 --- a/common/onap-tosca-datatype/src/main/java/org/onap/sdc/tosca/datatypes/model/ScalarUnitValidator.java +++ b/common/onap-tosca-datatype/src/main/java/org/onap/sdc/tosca/datatypes/model/ScalarUnitValidator.java @@ -28,10 +28,12 @@ import org.apache.commons.lang3.StringUtils; */ public class ScalarUnitValidator { - private static ScalarUnitValidator scalarUnitValidator = new ScalarUnitValidator(); + private static final ScalarUnitValidator scalarUnitValidator = new ScalarUnitValidator(); /** * Tosca Scalar Unit Types structure. + * + * At least positive integers, no single white space, 1 to 3 chars */ private final Pattern pattern = Pattern.compile("\\d+\\s*[a-zA-Z]{1,3}"); @@ -71,4 +73,4 @@ public class ScalarUnitValidator { .anyMatch(scalarUnit -> scalarUnit.name().equalsIgnoreCase(strValue) || strValue.endsWith(scalarUnit.name()))); } -} +}
\ No newline at end of file |