From e5aa35ac7f7d2c3c24f70fe9404acbd311517c0e Mon Sep 17 00:00:00 2001
From: abobrov <abobrov@localhost>
Date: Wed, 29 Apr 2009 01:59:04 +0000
Subject: [PATCH] - [Issue 3931] Virtual Attributes / Providers read/generate data multiple times : partial temp fix til refactoring is ready and safe or low risk impact.
---
opends/src/server/org/opends/server/protocols/ldap/LDAPAttribute.java | 14 +++++++++++---
1 files changed, 11 insertions(+), 3 deletions(-)
diff --git a/opends/src/server/org/opends/server/protocols/ldap/LDAPAttribute.java b/opends/src/server/org/opends/server/protocols/ldap/LDAPAttribute.java
index 1ccf7c9..5348115 100644
--- a/opends/src/server/org/opends/server/protocols/ldap/LDAPAttribute.java
+++ b/opends/src/server/org/opends/server/protocols/ldap/LDAPAttribute.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Copyright 2006-2008 Sun Microsystems, Inc.
+ * Copyright 2006-2009 Sun Microsystems, Inc.
*/
package org.opends.server.protocols.ldap;
@@ -172,13 +172,20 @@
this.attributeType = attribute.getName();
}
- if (attribute.isEmpty())
+ if (attribute.isVirtual())
+ {
+ values = new ArrayList<ByteString>();
+ }
+ else if (attribute.isEmpty())
{
values = new ArrayList<ByteString>(0);
return;
}
+ else
+ {
+ values = new ArrayList<ByteString>(attribute.size());
+ }
- values = new ArrayList<ByteString>(attribute.size());
for (AttributeValue v : attribute)
{
values.add(v.getValue());
@@ -289,6 +296,7 @@
*
* @return A string representation of this attribute.
*/
+ @Override
public String toString()
{
StringBuilder buffer = new StringBuilder();
--
Gitblit v1.10.0