From 3d4c0acccda6e62b23f248d75c1cc6721fc20bdf Mon Sep 17 00:00:00 2001
From: Jean-Noël Rouvignac <jean-noel.rouvignac@forgerock.com>
Date: Tue, 07 Jun 2016 13:51:21 +0000
Subject: [PATCH] OPENDJ-3037 inlined DirectoryServer.getAttributeType(String)
---
opendj-server-legacy/src/test/java/org/opends/server/replication/plugin/ModifyConflictTest.java | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/opendj-server-legacy/src/test/java/org/opends/server/replication/plugin/ModifyConflictTest.java b/opendj-server-legacy/src/test/java/org/opends/server/replication/plugin/ModifyConflictTest.java
index 3108888..3e1bc7c 100644
--- a/opendj-server-legacy/src/test/java/org/opends/server/replication/plugin/ModifyConflictTest.java
+++ b/opendj-server-legacy/src/test/java/org/opends/server/replication/plugin/ModifyConflictTest.java
@@ -46,6 +46,7 @@
import static org.assertj.core.api.Assertions.*;
import static org.forgerock.opendj.ldap.ModificationType.*;
+import static org.forgerock.opendj.ldap.schema.CoreSchema.*;
import static org.opends.server.TestCaseUtils.*;
import static org.opends.server.core.DirectoryServer.*;
import static org.opends.server.protocols.internal.InternalClientConnection.*;
@@ -1075,7 +1076,7 @@
UUID uuid = UUID.randomUUID();
// Create the att values list
- AttributeType entryuuidAttrType = getAttributeType(ENTRYUUID_ATTRIBUTE_NAME);
+ AttributeType entryuuidAttrType = getEntryUUIDAttributeType();
List<Attribute> uuidList = Attributes.createAsList(entryuuidAttrType, uuid.toString());
// Add the uuid in the entry
@@ -1162,7 +1163,7 @@
*/
private void assertEntryHistoricalEncodingDecoding(Entry entry, EntryHistorical hist)
{
- entry.removeAttribute(getAttributeType(HISTORICAL_ATTRIBUTE_NAME));
+ entry.removeAttribute(getSchema().getAttributeType(HISTORICAL_ATTRIBUTE_NAME));
entry.addAttribute(hist.encodeAndPurge(), null);
EntryHistorical hist2 = EntryHistorical.newInstanceFromEntry(entry);
assertEquals(hist2.encodeAndPurge(), hist.encodeAndPurge());
@@ -1194,7 +1195,7 @@
private void assertContainsOnlyValues(Entry entry, String attrName, String... expectedValues)
{
- Attribute attr = entry.getExactAttribute(AttributeDescription.create(getAttributeType(attrName)));
+ Attribute attr = entry.getExactAttribute(AttributeDescription.create(getSchema().getAttributeType(attrName)));
assertThat(attr).hasSize(expectedValues.length);
for (String value : expectedValues)
{
@@ -1215,8 +1216,7 @@
private String getEntryUUID(Entry entry)
{
- AttributeType entryuuidAttrType = getAttributeType(ENTRYUUID_ATTRIBUTE_NAME);
- List<Attribute> uuidAttrs = entry.getOperationalAttributes().get(entryuuidAttrType);
+ List<Attribute> uuidAttrs = entry.getAttribute(getEntryUUIDAttributeType());
return uuidAttrs.get(0).iterator().next().toString();
}
--
Gitblit v1.10.0