diff options
author | Thomas Watson | 2010-11-15 22:15:34 +0000 |
---|---|---|
committer | Thomas Watson | 2010-11-15 22:15:34 +0000 |
commit | 254ac7937a4ddeb055f887136cd7e77c2a00dc67 (patch) | |
tree | 9038373c06739f415a69d9c16ce8bbcef4191b7f | |
parent | b5308e90e39b74c8f7cf3fd4f35db840a289bf47 (diff) | |
download | rt.equinox.bundles-254ac7937a4ddeb055f887136cd7e77c2a00dc67.tar.gz rt.equinox.bundles-254ac7937a4ddeb055f887136cd7e77c2a00dc67.tar.xz rt.equinox.bundles-254ac7937a4ddeb055f887136cd7e77c2a00dc67.zip |
Bug 330148 - MetaType service ignores min and max restrictions for STRING and PASSWORD when specified independently.v20101115
-rw-r--r-- | bundles/org.eclipse.equinox.metatype/src/org/eclipse/equinox/metatype/AttributeDefinitionImpl.java | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/bundles/org.eclipse.equinox.metatype/src/org/eclipse/equinox/metatype/AttributeDefinitionImpl.java b/bundles/org.eclipse.equinox.metatype/src/org/eclipse/equinox/metatype/AttributeDefinitionImpl.java index aa7e50564..4d9118f65 100644 --- a/bundles/org.eclipse.equinox.metatype/src/org/eclipse/equinox/metatype/AttributeDefinitionImpl.java +++ b/bundles/org.eclipse.equinox.metatype/src/org/eclipse/equinox/metatype/AttributeDefinitionImpl.java @@ -344,10 +344,10 @@ public class AttributeDefinitionImpl extends LocalizationElement implements Attr // PASSWORD is treated like STRING. case PASSWORD : case STRING : - if ((_minValue != null) && (_maxValue != null)) { - if (value.length() > ((Integer) _maxValue).intValue() || value.length() < ((Integer) _minValue).intValue()) { - rangeError = true; - } + if (_minValue != null && value.length() < (Integer) _minValue) { + rangeError = true; + } else if (_maxValue != null && value.length() > (Integer) _maxValue) { + rangeError = true; } break; case LONG : |