mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

Jean-Noël Rouvignac
30.51.2016 4ed3b08887c800fb6f02ecc90df9092691b78208
opendj-server-legacy/src/main/java/org/opends/server/config/StringConfigAttribute.java
@@ -634,7 +634,7 @@
          if (pendingValues != null)
          {
            // We cannot have multiple pending value sets.
            throw new ConfigException(ERR_CONFIG_ATTR_MULTIPLE_PENDING_VALUE_SETS.get(attrDesc.getNameOrOID()));
            throw new ConfigException(ERR_CONFIG_ATTR_MULTIPLE_PENDING_VALUE_SETS.get(attrDesc));
          }
@@ -643,7 +643,7 @@
            if (isRequired())
            {
              // This is illegal -- it must have a value.
              throw new ConfigException(ERR_CONFIG_ATTR_IS_REQUIRED.get(attrDesc.getNameOrOID()));
              throw new ConfigException(ERR_CONFIG_ATTR_IS_REQUIRED.get(attrDesc));
            }
            // This is fine. The pending value set can be empty.
            pendingValues = new ArrayList<>(0);
@@ -654,9 +654,7 @@
            if (numValues > 1 && !isMultiValued())
            {
              // This is illegal -- the attribute is single-valued.
              LocalizableMessage message =
                  ERR_CONFIG_ATTR_SET_VALUES_IS_SINGLE_VALUED.get(attrDesc.getNameOrOID());
              throw new ConfigException(message);
              throw new ConfigException(ERR_CONFIG_ATTR_SET_VALUES_IS_SINGLE_VALUED.get(attrDesc));
            }
            pendingValues = new ArrayList<>(numValues);
@@ -670,7 +668,7 @@
        {
          // This is illegal -- only the pending option is allowed for
          // configuration attributes.
          throw new ConfigException(ERR_CONFIG_ATTR_OPTIONS_NOT_ALLOWED.get(attrDesc.getNameOrOID()));
          throw new ConfigException(ERR_CONFIG_ATTR_OPTIONS_NOT_ALLOWED.get(attrDesc));
        }
      }
      else
@@ -679,7 +677,7 @@
        if (activeValues!= null)
        {
          // We cannot have multiple active value sets.
          throw new ConfigException(ERR_CONFIG_ATTR_MULTIPLE_ACTIVE_VALUE_SETS.get(attrDesc.getNameOrOID()));
          throw new ConfigException(ERR_CONFIG_ATTR_MULTIPLE_ACTIVE_VALUE_SETS.get(attrDesc));
        }
@@ -688,7 +686,7 @@
          if (isRequired())
          {
            // This is illegal -- it must have a value.
            throw new ConfigException(ERR_CONFIG_ATTR_IS_REQUIRED.get(attrDesc.getNameOrOID()));
            throw new ConfigException(ERR_CONFIG_ATTR_IS_REQUIRED.get(attrDesc));
          }
          // This is fine. The active value set can be empty.
          activeValues = new ArrayList<>(0);
@@ -699,9 +697,7 @@
          if (numValues > 1 && !isMultiValued())
          {
            // This is illegal -- the attribute is single-valued.
            LocalizableMessage message =
                ERR_CONFIG_ATTR_SET_VALUES_IS_SINGLE_VALUED.get(attrDesc.getNameOrOID());
            throw new ConfigException(message);
            throw new ConfigException(ERR_CONFIG_ATTR_SET_VALUES_IS_SINGLE_VALUED.get(attrDesc));
          }
          activeValues = new ArrayList<>(numValues);