From 8643a9160860e31611f034467f702eb3a712eb34 Mon Sep 17 00:00:00 2001
From: Nicolas Capponi <nicolas.capponi@forgerock.com>
Date: Wed, 08 Jan 2014 14:33:23 +0000
Subject: [PATCH] Replace org.opends.server.util.Validator class by  org.forgerock.util.Reject class from forgerock-util module

---
 opendj3-server-dev/src/server/org/opends/server/util/LDIFWriter.java |   24 ++++++++++++------------
 1 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/opendj3-server-dev/src/server/org/opends/server/util/LDIFWriter.java b/opendj3-server-dev/src/server/org/opends/server/util/LDIFWriter.java
index ea1c66c..e9050ac 100644
--- a/opendj3-server-dev/src/server/org/opends/server/util/LDIFWriter.java
+++ b/opendj3-server-dev/src/server/org/opends/server/util/LDIFWriter.java
@@ -39,7 +39,7 @@
 import org.opends.server.types.*;
 
 import static org.opends.server.util.StaticUtils.*;
-import static org.opends.server.util.Validator.*;
+import static org.forgerock.util.Reject.*;
 
 /**
  * This class provides a mechanism for writing entries in LDIF form to a file or
@@ -77,7 +77,7 @@
   public LDIFWriter(LDIFExportConfig exportConfig)
          throws IOException
   {
-    ensureNotNull(exportConfig);
+    ifNull(exportConfig);
     this.exportConfig = exportConfig;
 
     writer = exportConfig.getWriter();
@@ -112,7 +112,7 @@
   public void writeComment(Message comment, int wrapColumn)
          throws IOException
   {
-    ensureNotNull(comment);
+    ifNull(comment);
 
 
     // First, break up the comment into multiple lines to preserve the original
@@ -235,7 +235,7 @@
   public boolean writeEntry(Entry entry)
          throws IOException, LDIFException
   {
-    ensureNotNull(entry);
+    ifNull(entry);
     return entry.toLDIF(exportConfig);
   }
 
@@ -260,7 +260,7 @@
   public boolean writeTemplateEntry(TemplateEntry templateEntry)
   throws IOException, LDIFException
   {
-    ensureNotNull(templateEntry);
+    ifNull(templateEntry);
     return templateEntry.toLDIF(exportConfig);
   }
 
@@ -274,7 +274,7 @@
   public void writeChangeRecord(ChangeRecordEntry changeRecord)
          throws IOException
   {
-    ensureNotNull(changeRecord);
+    ifNull(changeRecord);
 
 
     // Get the information necessary to write the LDIF.
@@ -399,7 +399,7 @@
   public void writeAddChangeRecord(Entry entry)
          throws IOException
   {
-    ensureNotNull(entry);
+    ifNull(entry);
 
 
     // Get the information necessary to write the LDIF.
@@ -469,7 +469,7 @@
   public void writeDeleteChangeRecord(Entry entry, boolean commentEntry)
          throws IOException
   {
-    ensureNotNull(entry);
+    ifNull(entry);
 
     // Get the information necessary to write the LDIF.
     BufferedWriter writer     = exportConfig.getWriter();
@@ -540,7 +540,7 @@
   public void writeModifyChangeRecord(DN dn, List<Modification> modifications)
          throws IOException
   {
-    ensureNotNull(dn, modifications);
+    ifNull(dn, modifications);
 
     // If there aren't any modifications, then there's nothing to do.
     if (modifications.isEmpty())
@@ -621,7 +621,7 @@
                                         DN newSuperior)
          throws IOException
   {
-    ensureNotNull(dn, newRDN);
+    ifNull(dn, newRDN);
 
 
     // Get the information necessary to write the LDIF.
@@ -750,7 +750,7 @@
   public static void appendLDIFSeparatorAndValue(StringBuilder buffer,
       ByteSequence valueBytes, boolean isURL, boolean isBase64)
   {
-    ensureNotNull(buffer, valueBytes);
+    ifNull(buffer, valueBytes);
 
 
     // If the value is empty, then just append a single colon (the URL '<' if
@@ -805,7 +805,7 @@
                                    boolean wrapLines, int wrapColumn)
           throws IOException
   {
-    ensureNotNull(line, writer);
+    ifNull(line, writer);
 
     int length = line.length();
     if (wrapLines && length > wrapColumn)

--
Gitblit v1.10.0