From e83ff6e21bb42b5d50a1550ca8b862419a2bd144 Mon Sep 17 00:00:00 2001
From: matthew_swift <matthew_swift@localhost>
Date: Mon, 11 Sep 2006 17:03:04 +0000
Subject: [PATCH] Implement a test suite for the LDIFReader class. Performed refactoring to reduce the amount of code duplication and improve the coupling between the LDIFReader class and the ChangeRecordEntry classes.
---
opends/src/server/org/opends/server/util/DeleteChangeRecordEntry.java | 40 +++-------------------------------------
1 files changed, 3 insertions(+), 37 deletions(-)
diff --git a/opends/src/server/org/opends/server/util/DeleteChangeRecordEntry.java b/opends/src/server/org/opends/server/util/DeleteChangeRecordEntry.java
index 83a416a..d40d58d 100644
--- a/opends/src/server/org/opends/server/util/DeleteChangeRecordEntry.java
+++ b/opends/src/server/org/opends/server/util/DeleteChangeRecordEntry.java
@@ -30,16 +30,11 @@
import static org.opends.server.loggers.Debug.debugConstructor;
import static org.opends.server.loggers.Debug.debugEnter;
-import static org.opends.server.messages.MessageHandler.getMessage;
-import static org.opends.server.messages.UtilityMessages.*;
-
-import java.util.LinkedList;
import org.opends.server.types.DN;
-
/**
* This class defines a data structure for a change record entry for
* an delete operation. It includes a DN and a set of attributes, as well as
@@ -59,14 +54,12 @@
* Creates a new entry with the provided information.
*
* @param dn The distinguished name for this entry.
- * @param reader The LDIFReader instance used to read the entries.
*/
- public DeleteChangeRecordEntry(DN dn, LDIFReader reader)
+ public DeleteChangeRecordEntry(DN dn)
{
- super(dn, reader);
- assert debugConstructor(CLASS_NAME, String.valueOf(dn),
- String.valueOf(reader));
+ super(dn);
+ assert debugConstructor(CLASS_NAME, String.valueOf(dn));
}
@@ -83,32 +76,5 @@
return ChangeOperationType.DELETE;
}
-
- /**
- * Parse the lines and populate the internal structures.
- *
- * @param lines The lines to parse.
- * @param lineNumber The current line number.
- *
- * @exception LDIFException if there is an error during parsing.
- */
-
- public void parse(LinkedList<StringBuilder> lines, long lineNumber)
- throws LDIFException
- {
- assert debugEnter(CLASS_NAME, "parse", String.valueOf(lines),
- String.valueOf(lineNumber));
-
- if(! lines.isEmpty())
- {
- int msgID = MSGID_LDIF_INVALID_DELETE_ATTRIBUTES;
- String message = getMessage(msgID);
-
- throw new LDIFException(msgID, message, lineNumber, true);
-
- }
- }
-
-
}
--
Gitblit v1.10.0