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/guitools/org/opends/guitools/controlpanel/task/ModifyEntryTask.java | 21 ++++++---------------
1 files changed, 6 insertions(+), 15 deletions(-)
diff --git a/opends/src/guitools/org/opends/guitools/controlpanel/task/ModifyEntryTask.java b/opends/src/guitools/org/opends/guitools/controlpanel/task/ModifyEntryTask.java
index e3d60ec..fdb47c5 100644
--- a/opends/src/guitools/org/opends/guitools/controlpanel/task/ModifyEntryTask.java
+++ b/opends/src/guitools/org/opends/guitools/controlpanel/task/ModifyEntryTask.java
@@ -62,16 +62,7 @@
import org.opends.messages.AdminToolMessages;
import org.opends.messages.Message;
import org.opends.server.config.ConfigConstants;
-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.DN;
-import org.opends.server.types.DirectoryException;
-import org.opends.server.types.Entry;
-import org.opends.server.types.OpenDsException;
-import org.opends.server.types.RDN;
-import org.opends.server.types.Schema;
+import org.opends.server.types.*;
/**
* The task that is called when we must modify an entry.
@@ -691,7 +682,7 @@
Attribute attribute = new BasicAttribute(attrName);
for (AttributeValue value : values)
{
- attribute.add(value.getValue().value());
+ attribute.add(value.getValue().toByteArray());
}
return attribute;
}
@@ -709,17 +700,17 @@
ByteString v;
if (value instanceof String)
{
- v = ByteStringFactory.create((String)value);
+ v = ByteString.valueOf((String)value);
}
else if (value instanceof byte[])
{
- v = ByteStringFactory.create((byte[])value);
+ v = ByteString.wrap((byte[])value);
}
else
{
- v = ByteStringFactory.create(String.valueOf(value));
+ v = ByteString.valueOf(String.valueOf(value));
}
- return new AttributeValue(attrType, v);
+ return AttributeValues.create(attrType, v);
}
/**
--
Gitblit v1.10.0