From ed699902a89c7be9c46f3c9bb24c33fdee507879 Mon Sep 17 00:00:00 2001
From: neil_a_wilson <neil_a_wilson@localhost>
Date: Thu, 12 Oct 2006 05:27:32 +0000
Subject: [PATCH] Update code in the org.opends.server.util package to use the Validator.ensureNotNull method for arguments that are not allowed to be null, and also update the javadoc for the corresponding @param tags to indicate this.
---
opends/src/server/org/opends/server/util/AddChangeRecordEntry.java | 9 +++++++--
1 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/opends/src/server/org/opends/server/util/AddChangeRecordEntry.java b/opends/src/server/org/opends/server/util/AddChangeRecordEntry.java
index 90ff808..f73bf62 100644
--- a/opends/src/server/org/opends/server/util/AddChangeRecordEntry.java
+++ b/opends/src/server/org/opends/server/util/AddChangeRecordEntry.java
@@ -30,6 +30,7 @@
import static org.opends.server.loggers.Debug.debugConstructor;
import static org.opends.server.loggers.Debug.debugEnter;
+import static org.opends.server.util.Validator.*;
import java.util.ArrayList;
import java.util.Collections;
@@ -67,9 +68,11 @@
* Creates a new entry with the provided information.
*
* @param dn
- * The distinguished name for this entry.
+ * The distinguished name for this entry. It must not be
+ * <CODE>null</CODE>.
* @param attributes
- * The entry attributes for this operation.
+ * The entry attributes for this operation. It must not be
+ * <CODE>null</CODE>.
*/
public AddChangeRecordEntry(DN dn,
Map<AttributeType,List<Attribute>> attributes)
@@ -79,6 +82,8 @@
assert debugConstructor(CLASS_NAME, String.valueOf(dn),
String.valueOf(attributes));
+ ensureNotNull(attributes);
+
this.attributes = new ArrayList<Attribute>(attributes.size());
for (List<Attribute> list : attributes.values())
--
Gitblit v1.10.0