From 8b3cd28204e15e0a98ce038b355f100cd7c44e3c Mon Sep 17 00:00:00 2001
From: Nicolas Capponi <capponi.nicolas@gmail.com>
Date: Thu, 28 Jan 2016 08:28:20 +0000
Subject: [PATCH] OPENDJ-1632 (PR-201) Migrate AttributeType in one shot
---
opendj-server-legacy/src/test/java/org/opends/server/admin/ValidateConfigDefinitionsTest.java | 9 +++++----
1 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/opendj-server-legacy/src/test/java/org/opends/server/admin/ValidateConfigDefinitionsTest.java b/opendj-server-legacy/src/test/java/org/opends/server/admin/ValidateConfigDefinitionsTest.java
index 86f6010..e2fcfe5 100644
--- a/opendj-server-legacy/src/test/java/org/opends/server/admin/ValidateConfigDefinitionsTest.java
+++ b/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()) {
--
Gitblit v1.10.0