From f41aab0eb9b8fc42c1caea3a15434c000234c26a Mon Sep 17 00:00:00 2001
From: Chris Ridd <chris.ridd@forgerock.com>
Date: Wed, 01 May 2013 08:19:06 +0000
Subject: [PATCH] Back out commits 8812-8814

---
 opends/tests/unit-tests-testng/src/server/org/opends/server/replication/plugin/AttrInfoTest.java |   18 ++++++++----------
 1 files changed, 8 insertions(+), 10 deletions(-)

diff --git a/opends/tests/unit-tests-testng/src/server/org/opends/server/replication/plugin/AttrInfoTest.java b/opends/tests/unit-tests-testng/src/server/org/opends/server/replication/plugin/AttrInfoTest.java
index 9a79ee5..da52880 100644
--- a/opends/tests/unit-tests-testng/src/server/org/opends/server/replication/plugin/AttrInfoTest.java
+++ b/opends/tests/unit-tests-testng/src/server/org/opends/server/replication/plugin/AttrInfoTest.java
@@ -23,12 +23,10 @@
  *
  *
  *      Copyright 2006-2010 Sun Microsystems, Inc.
- *      Portions Copyright 2013 ForgeRock, AS.
  */
 package org.opends.server.replication.plugin;
 
-import java.util.HashMap;
-import java.util.Map;
+import java.util.ArrayList;
 
 import org.opends.server.core.DirectoryServer;
 import org.opends.server.replication.ReplicationTestCase;
@@ -91,15 +89,15 @@
 
     // Check add(AttributeValue val, ChangeNumber CN)
     attrInfo1.add(att, updateTime);
-    Map<AttrValueHistorical,AttrValueHistorical> values1 = attrInfo1.getValuesHistorical();
+    ArrayList<AttrValueHistorical> values1 = attrInfo1.getValuesHistorical();
     assertTrue(values1.size() == 1);
     AttrValueHistorical valueInfo1 = new AttrValueHistorical(att, updateTime, null);
-    assertTrue(values1.containsKey(valueInfo1));
+    assertTrue(values1.get(0).equals(valueInfo1));
 
     // Check constructor with parameter
     AttrValueHistorical valueInfo2 = new AttrValueHistorical(att, updateTime, deleteTime);
-    HashMap<AttrValueHistorical,AttrValueHistorical> values = new HashMap<AttrValueHistorical,AttrValueHistorical>();
-    values.put(valueInfo2, valueInfo2);
+    ArrayList<AttrValueHistorical> values = new ArrayList<AttrValueHistorical>();
+    values.add(valueInfo2);
     AttrHistoricalMultiple attrInfo2 = new AttrHistoricalMultiple(deleteTime, updateTime, values);
 
     // Check equality
@@ -108,14 +106,14 @@
     //  Check constructor with time parameter and not Value
     AttrHistoricalMultiple attrInfo3 = new AttrHistoricalMultiple(deleteTime, updateTime, null);
     attrInfo3.add(att, updateTime);
-    Map<AttrValueHistorical,AttrValueHistorical> values3 = attrInfo3.getValuesHistorical();
+    ArrayList<AttrValueHistorical> values3 = attrInfo3.getValuesHistorical();
     assertTrue(values3.size() == 1);
     valueInfo1 = new AttrValueHistorical(att, updateTime, null);
-    assertTrue(values3.containsKey(valueInfo1));
+    assertTrue(values3.get(0).equals(valueInfo1));
 
     // Check duplicate
     AttrHistoricalMultiple attrInfo4 = attrInfo3.duplicate();
-    Map<AttrValueHistorical,AttrValueHistorical> values4 = attrInfo4.getValuesHistorical();
+    ArrayList<AttrValueHistorical> values4 = attrInfo4.getValuesHistorical();
     assertTrue(attrInfo4.getDeleteTime().compareTo(attrInfo3.getDeleteTime())==0);
     assertEquals(values4.size(), values3.size());
 

--
Gitblit v1.10.0