From 22094368c2865dcfb6daf8366425212b721a4657 Mon Sep 17 00:00:00 2001
From: matthew_swift <matthew_swift@localhost>
Date: Thu, 05 Feb 2009 17:42:14 +0000
Subject: [PATCH] Merge ASN1 branch to trunk

---
 opends/src/server/org/opends/server/extensions/EntryDNVirtualAttributeProvider.java |   25 +++++++------------------
 1 files changed, 7 insertions(+), 18 deletions(-)

diff --git a/opends/src/server/org/opends/server/extensions/EntryDNVirtualAttributeProvider.java b/opends/src/server/org/opends/server/extensions/EntryDNVirtualAttributeProvider.java
index 31ada60..a791ebe 100644
--- a/opends/src/server/org/opends/server/extensions/EntryDNVirtualAttributeProvider.java
+++ b/opends/src/server/org/opends/server/extensions/EntryDNVirtualAttributeProvider.java
@@ -40,18 +40,7 @@
 import org.opends.server.core.DirectoryServer;
 import org.opends.server.core.SearchOperation;
 import org.opends.server.loggers.debug.DebugTracer;
-import org.opends.server.types.AttributeType;
-import org.opends.server.types.AttributeValue;
-import org.opends.server.types.ByteString;
-import org.opends.server.types.ByteStringFactory;
-import org.opends.server.types.ConditionResult;
-import org.opends.server.types.DebugLogLevel;
-import org.opends.server.types.DN;
-import org.opends.server.types.Entry;
-import org.opends.server.types.InitializationException;
-import org.opends.server.types.SearchFilter;
-import org.opends.server.types.SearchScope;
-import org.opends.server.types.VirtualAttributeRule;
+import org.opends.server.types.*;
 
 import static org.opends.server.loggers.debug.DebugLogger.*;
 import static org.opends.server.util.ServerConstants.*;
@@ -115,9 +104,9 @@
                                        VirtualAttributeRule rule)
   {
     String normDNString = entry.getDN().toNormalizedString();
-    AttributeValue value = new AttributeValue(
-                                  ByteStringFactory.create(normDNString),
-                                  ByteStringFactory.create(normDNString));
+    AttributeValue value = AttributeValues.create(
+                                  ByteString.valueOf(normDNString),
+                                  ByteString.valueOf(normDNString));
     return Collections.singleton(value);
   }
 
@@ -145,7 +134,7 @@
     try
     {
       String normalizedDN    = entry.getDN().toNormalizedString();
-      String normalizedValue = value.getNormalizedStringValue();
+      String normalizedValue = value.getNormalizedValue().toString();
       return normalizedDN.equals(normalizedValue);
     }
     catch (Exception e)
@@ -170,8 +159,8 @@
   {
     String ndnString = entry.getDN().toNormalizedString();
 
-    AttributeValue v = new AttributeValue(ByteStringFactory.create(ndnString),
-                                          ByteStringFactory.create(ndnString));
+    AttributeValue v = AttributeValues.create(ByteString.valueOf(ndnString),
+        ByteString.valueOf(ndnString));
     return values.contains(v);
   }
 

--
Gitblit v1.10.0