From 97eaa897d7f912266710fa43d21a4d36de27de41 Mon Sep 17 00:00:00 2001
From: Jean-Noël Rouvignac <jean-noel.rouvignac@forgerock.com>
Date: Fri, 29 Jan 2016 15:01:26 +0000
Subject: [PATCH] *Test*.java: Changed client code from DirectoryServer.getAttributeTypeOrNull() to DirectoryServer.getAttributeType()
---
opendj-server-legacy/src/test/java/org/opends/server/util/TestLDIFReader.java | 23 ++++++++++++++++-------
1 files changed, 16 insertions(+), 7 deletions(-)
diff --git a/opendj-server-legacy/src/test/java/org/opends/server/util/TestLDIFReader.java b/opendj-server-legacy/src/test/java/org/opends/server/util/TestLDIFReader.java
index 8ea0135..3aa45c7 100644
--- a/opendj-server-legacy/src/test/java/org/opends/server/util/TestLDIFReader.java
+++ b/opendj-server-legacy/src/test/java/org/opends/server/util/TestLDIFReader.java
@@ -37,10 +37,19 @@
import org.forgerock.i18n.LocalizableMessage;
import org.forgerock.opendj.ldap.ByteString;
import org.forgerock.opendj.ldap.ModificationType;
+import org.forgerock.opendj.ldap.schema.AttributeType;
import org.opends.server.TestCaseUtils;
import org.opends.server.core.DirectoryServer;
-import org.forgerock.opendj.ldap.schema.AttributeType;
-import org.opends.server.types.*;
+import org.opends.server.types.Attribute;
+import org.opends.server.types.AttributeBuilder;
+import org.opends.server.types.Attributes;
+import org.opends.server.types.DN;
+import org.opends.server.types.Entry;
+import org.opends.server.types.LDIFImportConfig;
+import org.opends.server.types.Modification;
+import org.opends.server.types.ObjectClass;
+import org.opends.server.types.RDN;
+import org.opends.server.types.RawModification;
import org.testng.Assert;
import org.testng.annotations.AfterClass;
import org.testng.annotations.BeforeClass;
@@ -177,10 +186,10 @@
OC_PERSON = DirectoryServer.getObjectClass("person");
AT_OC = DirectoryServer.getObjectClassAttributeType();
- AT_CN = DirectoryServer.getAttributeTypeOrNull("cn");
- AT_SN = DirectoryServer.getAttributeTypeOrNull("sn");
- AT_DESCR = DirectoryServer.getAttributeTypeOrNull("description");
- AT_TELN = DirectoryServer.getAttributeTypeOrNull("telephonenumber");
+ AT_CN = DirectoryServer.getAttributeType("cn");
+ AT_SN = DirectoryServer.getAttributeType("sn");
+ AT_DESCR = DirectoryServer.getAttributeType("description");
+ AT_TELN = DirectoryServer.getAttributeType("telephonenumber");
// Create a temporary file containing an attribute value.
TEMP_FILE = File.createTempFile("tmp", "txt");
@@ -560,7 +569,7 @@
Assert.assertTrue(i.hasNext());
mod = i.next().toModification();
Assert.assertEquals(mod.getModificationType(), ModificationType.REPLACE);
- attr = Attributes.empty(DirectoryServer.getAttributeTypeOrNull("postaladdress"));
+ attr = Attributes.empty(DirectoryServer.getAttributeType("postaladdress"));
Assert.assertEquals(mod.getAttribute(), attr);
// Change record #7.
--
Gitblit v1.10.0