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

Nicolas Capponi
26.08.2015 8b3cd28204e15e0a98ce038b355f100cd7c44e3c
opendj-server-legacy/src/test/java/org/opends/server/admin/ValidateConfigDefinitionsTest.java
@@ -22,7 +22,7 @@
 *
 *
 *      Copyright 2008 Sun Microsystems, Inc.
 *      Portions Copyright 2011-2015 ForgeRock AS
 *      Portions Copyright 2011-2016 ForgeRock AS
 */
package org.opends.server.admin;
@@ -38,7 +38,7 @@
import org.opends.server.DirectoryServerTestCase;
import org.opends.server.TestCaseUtils;
import org.opends.server.core.DirectoryServer;
import org.opends.server.types.AttributeType;
import org.forgerock.opendj.ldap.schema.AttributeType;
import org.opends.server.types.ObjectClass;
import org.opends.server.types.Schema;
import org.testng.Assert;
@@ -188,13 +188,14 @@
    Schema schema = DirectoryServer.getSchema();
    AttributeType attrType = schema.getAttributeType(ldapAttrName.toLowerCase());
    // LDAP attribute exists
    if (attrType == null) {
    if (!schema.hasAttributeType(ldapAttrName.toLowerCase()))
    {
      errors.append(propName + " property on config object " + objName + " is declared" +
               " to use ldap attribute " + ldapAttrName + ", but this attribute is not in the schema ").append(EOL + EOL);
    } else {
      AttributeType attrType = schema.getAttributeType(ldapAttrName.toLowerCase());
      // LDAP attribute is multivalued if the property is multivalued
      if (propDef.hasOption(PropertyOption.MULTI_VALUED) && attrType.isSingleValue()) {