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/admin/PropertyDefinition.java |   19 ++++++++++---------
 1 files changed, 10 insertions(+), 9 deletions(-)

diff --git a/opendj3-server-dev/src/server/org/opends/server/admin/PropertyDefinition.java b/opendj3-server-dev/src/server/org/opends/server/admin/PropertyDefinition.java
index f108e8d..a8fd20b 100644
--- a/opendj3-server-dev/src/server/org/opends/server/admin/PropertyDefinition.java
+++ b/opendj3-server-dev/src/server/org/opends/server/admin/PropertyDefinition.java
@@ -22,13 +22,14 @@
  *
  *
  *      Copyright 2008 Sun Microsystems, Inc.
+ *      Portions Copyright 2014 ForgeRock AS
  */
 
 package org.opends.server.admin;
 
 
 
-import static org.opends.server.util.Validator.*;
+import static org.forgerock.util.Reject.*;
 
 import java.util.Comparator;
 import java.util.EnumSet;
@@ -126,7 +127,7 @@
      *          The administrator action.
      */
     public final void setAdministratorAction(AdministratorAction adminAction) {
-      ensureNotNull(adminAction);
+      ifNull(adminAction);
       this.adminAction = adminAction;
     }
 
@@ -140,7 +141,7 @@
      */
     public final void setDefaultBehaviorProvider(
         DefaultBehaviorProvider<T> defaultBehavior) {
-      ensureNotNull(defaultBehavior);
+      ifNull(defaultBehavior);
       this.defaultBehavior = defaultBehavior;
     }
 
@@ -153,7 +154,7 @@
      *          The property option.
      */
     public final void setOption(PropertyOption option) {
-      ensureNotNull(option);
+      ifNull(option);
       options.add(option);
     }
 
@@ -223,8 +224,8 @@
       Class<T> theClass, String propertyName, EnumSet<PropertyOption> options,
       AdministratorAction adminAction,
       DefaultBehaviorProvider<T> defaultBehavior) {
-    ensureNotNull(d, theClass, propertyName);
-    ensureNotNull(options, adminAction, defaultBehavior);
+    ifNull(d, theClass, propertyName);
+    ifNull(options, adminAction, defaultBehavior);
 
     this.definition = d;
     this.theClass = theClass;
@@ -323,7 +324,7 @@
    *         the second.
    */
   public int compare(T o1, T o2) {
-    ensureNotNull(o1, o2);
+    ifNull(o1, o2);
 
     String s1 = normalizeValue(o1);
     String s2 = normalizeValue(o2);
@@ -386,7 +387,7 @@
    *           If the property value is invalid.
    */
   public String encodeValue(T value) throws IllegalPropertyValueException {
-    ensureNotNull(value);
+    ifNull(value);
 
     return value.toString();
   }
@@ -605,7 +606,7 @@
    *           If the property value is invalid.
    */
   public String normalizeValue(T value) throws IllegalPropertyValueException {
-    ensureNotNull(value);
+    ifNull(value);
 
     return encodeValue(value);
   }

--
Gitblit v1.10.0