From 5e0a551935151242e4308053617c2f487a60d5f0 Mon Sep 17 00:00:00 2001
From: Jean-Noël Rouvignac <jean-noel.rouvignac@forgerock.com>
Date: Mon, 08 Aug 2016 07:31:26 +0000
Subject: [PATCH] Partial OPENDJ-3106 Migrate Entry
---
opendj-server-legacy/src/main/java/org/opends/server/replication/plugin/EntryHistorical.java | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/opendj-server-legacy/src/main/java/org/opends/server/replication/plugin/EntryHistorical.java b/opendj-server-legacy/src/main/java/org/opends/server/replication/plugin/EntryHistorical.java
index 389cdc3..0cb9c59 100644
--- a/opendj-server-legacy/src/main/java/org/opends/server/replication/plugin/EntryHistorical.java
+++ b/opendj-server-legacy/src/main/java/org/opends/server/replication/plugin/EntryHistorical.java
@@ -19,6 +19,7 @@
import static org.forgerock.opendj.ldap.schema.CoreSchema.*;
import static org.opends.messages.ReplicationMessages.*;
import static org.opends.server.replication.plugin.HistAttrModificationKey.*;
+import static org.opends.server.util.CollectionUtils.*;
import java.util.HashMap;
import java.util.Iterator;
@@ -515,11 +516,11 @@
public static EntryHistorical newInstanceFromEntry(Entry entry)
{
// Read the DB historical attribute from the entry
- List<Attribute> histAttrWithOptionsFromEntry = getHistoricalAttr(entry);
+ Iterable<Attribute> histAttrWithOptionsFromEntry = getHistoricalAttr(entry);
// Now we'll build the Historical object we want to construct
final EntryHistorical newHistorical = new EntryHistorical();
- if (histAttrWithOptionsFromEntry.isEmpty())
+ if (isEmpty(histAttrWithOptionsFromEntry))
{
// No historical attribute in the entry, return empty object
return newHistorical;
@@ -660,7 +661,7 @@
* Several values on the list if several options for this attribute.
* Null if not present.
*/
- public static List<Attribute> getHistoricalAttr(Entry entry)
+ public static Iterable<Attribute> getHistoricalAttr(Entry entry)
{
return entry.getAllAttributes(HISTORICAL_ATTRIBUTE_NAME);
}
--
Gitblit v1.10.0