From 887e246785056b972a725b5ef8457980325216fb Mon Sep 17 00:00:00 2001
From: Ludovic Poitou <ludovic.poitou@forgerock.com>
Date: Fri, 22 Oct 2010 07:03:51 +0000
Subject: [PATCH] Sync commits from boli Added unmodifiable and copyOf response factories. Made LinkedHashMapEntry copy constructor perform a deep copy of attributes.

---
 sdk/src/org/opends/sdk/responses/SearchResultEntryImpl.java |   22 ++++++++++++++++++++--
 1 files changed, 20 insertions(+), 2 deletions(-)

diff --git a/sdk/src/org/opends/sdk/responses/SearchResultEntryImpl.java b/sdk/src/org/opends/sdk/responses/SearchResultEntryImpl.java
index 0b044ab..5aeb20c 100644
--- a/sdk/src/org/opends/sdk/responses/SearchResultEntryImpl.java
+++ b/sdk/src/org/opends/sdk/responses/SearchResultEntryImpl.java
@@ -22,7 +22,7 @@
  * CDDL HEADER END
  *
  *
- *      Copyright 2009-2010 Sun Microsystems, Inc.
+ *      Copyright 2010 Sun Microsystems, Inc.
  */
 
 package org.opends.sdk.responses;
@@ -58,7 +58,7 @@
    * @throws NullPointerException
    *           If {@code entry} was {@code null} .
    */
-  public SearchResultEntryImpl(final Entry entry) throws NullPointerException
+  SearchResultEntryImpl(final Entry entry) throws NullPointerException
   {
     this.entry = entry;
   }
@@ -66,6 +66,24 @@
 
 
   /**
+   * Creates a new search result entry that is an exact copy of the provided
+   * result.
+   *
+   * @param searchResultEntry
+   *          The search result entry to be copied.
+   * @throws NullPointerException
+   *           If {@code searchResultEntry} was {@code null} .
+   */
+  SearchResultEntryImpl(final SearchResultEntry searchResultEntry)
+      throws NullPointerException
+  {
+    super(searchResultEntry);
+    this.entry = new LinkedHashMapEntry(searchResultEntry);
+  }
+
+
+
+  /**
    * {@inheritDoc}
    */
   public boolean addAttribute(final Attribute attribute)

--
Gitblit v1.10.0