From fa2c596315129d5622e738acc9454769af3b2425 Mon Sep 17 00:00:00 2001
From: matthew_swift <matthew_swift@localhost>
Date: Fri, 17 Sep 2010 22:22:03 +0000
Subject: [PATCH] Make sure inherited collective attributes are always encapsulated by CollectiveVirtualAttribute

---
 opends/src/server/org/opends/server/types/Entry.java    |    2 ++
 opends/src/server/org/opends/server/types/SubEntry.java |    7 ++++---
 2 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/opends/src/server/org/opends/server/types/Entry.java b/opends/src/server/org/opends/server/types/Entry.java
index 26016d5..edcbc39 100644
--- a/opends/src/server/org/opends/server/types/Entry.java
+++ b/opends/src/server/org/opends/server/types/Entry.java
@@ -3795,6 +3795,8 @@
               {
                 continue;
               }
+              collectiveAttr = new CollectiveVirtualAttribute(
+                      collectiveAttr);
             }
             else
             {
diff --git a/opends/src/server/org/opends/server/types/SubEntry.java b/opends/src/server/org/opends/server/types/SubEntry.java
index 3c6a344..e916f12 100644
--- a/opends/src/server/org/opends/server/types/SubEntry.java
+++ b/opends/src/server/org/opends/server/types/SubEntry.java
@@ -409,9 +409,10 @@
         {
           for (AttributeValue value : attr)
           {
-            this.collectiveAttributes.add(
-                    Attributes.empty(
-                    value.toString()));
+            CollectiveVirtualAttribute collectiveAttr =
+              new CollectiveVirtualAttribute(
+                Attributes.empty(value.toString()));
+            this.collectiveAttributes.add(collectiveAttr);
           }
         }
       }

--
Gitblit v1.10.0