From df59285898b635c3c9f3011609eb7a73e779ecb9 Mon Sep 17 00:00:00 2001
From: Jean-Noel Rouvignac <jean-noel.rouvignac@forgerock.com>
Date: Fri, 07 Feb 2014 10:10:50 +0000
Subject: [PATCH] OPENDJ-1307 Migrate server ASN1 classes to SDK
---
opendj3-server-dev/src/server/org/opends/server/replication/protocol/AddMsg.java | 17 ++++++++---------
1 files changed, 8 insertions(+), 9 deletions(-)
diff --git a/opendj3-server-dev/src/server/org/opends/server/replication/protocol/AddMsg.java b/opendj3-server-dev/src/server/org/opends/server/replication/protocol/AddMsg.java
index cd4fb84..2b00b17 100644
--- a/opendj3-server-dev/src/server/org/opends/server/replication/protocol/AddMsg.java
+++ b/opendj3-server-dev/src/server/org/opends/server/replication/protocol/AddMsg.java
@@ -35,9 +35,9 @@
import org.opends.server.core.AddOperation;
import org.opends.server.core.AddOperationBasis;
import org.opends.server.core.DirectoryServer;
-import org.opends.server.protocols.asn1.ASN1;
-import org.opends.server.protocols.asn1.ASN1Exception;
-import org.opends.server.protocols.asn1.ASN1Writer;
+import org.forgerock.opendj.io.ASN1;
+import org.forgerock.opendj.ldap.DecodeException;
+import org.forgerock.opendj.io.ASN1Writer;
import org.opends.server.protocols.internal.InternalClientConnection;
import org.opends.server.protocols.ldap.LDAPAttribute;
import org.opends.server.replication.common.CSN;
@@ -174,7 +174,7 @@
@Override
public AddOperation createOperation(
InternalClientConnection connection, DN newDN)
- throws LDAPException, ASN1Exception
+ throws LDAPException, DecodeException
{
List<RawAttribute> attr = decodeRawAttributes(encodedAttributes);
@@ -520,10 +520,9 @@
*
* @param name The name of the attribute to add.
* @param value The value of the attribute to add.
- * @throws ASN1Exception When this Msg is not valid.
+ * @throws DecodeException When this Msg is not valid.
*/
- public void addAttribute(String name, String value)
- throws ASN1Exception
+ public void addAttribute(String name, String value) throws DecodeException
{
ByteStringBuilder byteBuilder = new ByteStringBuilder();
byteBuilder.append(encodedAttributes);
@@ -545,10 +544,10 @@
/**
* Get the attributes of this add msg.
* @throws LDAPException In case of LDAP decoding exception
- * @throws ASN1Exception In case of ASN1 decoding exception
+ * @throws DecodeException In case of ASN1 decoding exception
* @return the list of attributes
*/
- public List<Attribute> getAttributes() throws LDAPException, ASN1Exception
+ public List<Attribute> getAttributes() throws LDAPException, DecodeException
{
return decodeAttributes(encodedAttributes);
}
--
Gitblit v1.10.0