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/config/IntegerWithUnitConfigAttribute.java | 19 ++++++++-----------
1 files changed, 8 insertions(+), 11 deletions(-)
diff --git a/opends/src/server/org/opends/server/config/IntegerWithUnitConfigAttribute.java b/opends/src/server/org/opends/server/config/IntegerWithUnitConfigAttribute.java
index d2eb81c..7307545 100644
--- a/opends/src/server/org/opends/server/config/IntegerWithUnitConfigAttribute.java
+++ b/opends/src/server/org/opends/server/config/IntegerWithUnitConfigAttribute.java
@@ -41,10 +41,7 @@
import org.opends.server.api.AttributeSyntax;
import org.opends.server.core.DirectoryServer;
-import org.opends.server.protocols.asn1.ASN1OctetString;
-import org.opends.server.types.Attribute;
-import org.opends.server.types.AttributeValue;
-import org.opends.server.types.DebugLogLevel;
+import org.opends.server.types.*;
import static org.opends.server.config.ConfigConstants.*;
import static org.opends.server.loggers.debug.DebugLogger.*;
@@ -612,8 +609,8 @@
new LinkedHashSet<AttributeValue>(1);
String valueString = intValue + " " + unit;
- valueSet.add(new AttributeValue(new ASN1OctetString(valueString),
- new ASN1OctetString(valueString)));
+ valueSet.add(AttributeValues.create(ByteString.valueOf(valueString),
+ ByteString.valueOf(valueString)));
return valueSet;
}
@@ -656,7 +653,7 @@
StringBuilder rejectReason)
{
// Get a string representation of the value and convert it to lowercase.
- String lowerValue = value.getStringValue().toLowerCase();
+ String lowerValue = value.getValue().toString().toLowerCase();
return valueIsAcceptable(lowerValue, rejectReason);
}
@@ -833,8 +830,8 @@
}
- valueSet.add(new AttributeValue(new ASN1OctetString(valueString),
- new ASN1OctetString(valueString)));
+ valueSet.add(AttributeValues.create(ByteString.valueOf(valueString),
+ ByteString.valueOf(valueString)));
}
@@ -956,7 +953,7 @@
{
Iterator<AttributeValue> iterator = a.iterator();
- String valueString = iterator.next().getStringValue();
+ String valueString = iterator.next().getValue().toString();
if (iterator.hasNext())
{
@@ -1041,7 +1038,7 @@
{
Iterator<AttributeValue> iterator = a.iterator();
- String valueString = iterator.next().getStringValue();
+ String valueString = iterator.next().getValue().toString();
if (iterator.hasNext())
{
--
Gitblit v1.10.0