From 813c78e0dd2862ff7eb2c80963d80ab81e1c1bf9 Mon Sep 17 00:00:00 2001
From: Matthew Swift <matthew.swift@forgerock.com>
Date: Thu, 19 Dec 2013 14:51:01 +0000
Subject: [PATCH] Minor refactoring: remove Validator class and use forgerock-util Reject instead.

---
 opendj-sdk/opendj-admin/src/main/java/org/opends/server/admin/ClassPropertyDefinition.java |   13 +++++++------
 1 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/opendj-sdk/opendj-admin/src/main/java/org/opends/server/admin/ClassPropertyDefinition.java b/opendj-sdk/opendj-admin/src/main/java/org/opends/server/admin/ClassPropertyDefinition.java
index 2db33cb..eb485fb 100644
--- a/opendj-sdk/opendj-admin/src/main/java/org/opends/server/admin/ClassPropertyDefinition.java
+++ b/opendj-sdk/opendj-admin/src/main/java/org/opends/server/admin/ClassPropertyDefinition.java
@@ -27,7 +27,7 @@
 
 package org.opends.server.admin;
 
-import static com.forgerock.opendj.util.Validator.*;
+import org.forgerock.util.Reject;
 
 import java.util.Collections;
 import java.util.EnumSet;
@@ -71,7 +71,7 @@
          *            The name of a class which property values must implement.
          */
         public final void addInstanceOf(String className) {
-            ensureNotNull(className);
+            Reject.ifNull(className);
 
             /*
              * Do some basic checks to make sure the string representation is
@@ -204,7 +204,7 @@
      */
     @Override
     public String decodeValue(String value) throws IllegalPropertyValueStringException {
-        ensureNotNull(value);
+        Reject.ifNull(value);
 
         try {
             validateValue(value);
@@ -247,7 +247,8 @@
      */
     public <T> Class<? extends T> loadClass(String className, Class<T> instanceOf)
             throws IllegalPropertyValueException, ClassCastException {
-        ensureNotNull(className, instanceOf);
+        Reject.ifNull(className);
+        Reject.ifNull(instanceOf);
 
         // Make sure that the named class is valid.
         validateClassName(className);
@@ -262,7 +263,7 @@
      */
     @Override
     public String normalizeValue(String value) throws IllegalPropertyValueException {
-        ensureNotNull(value);
+        Reject.ifNull(value);
 
         return value.trim();
     }
@@ -272,7 +273,7 @@
      */
     @Override
     public void validateValue(String value) throws IllegalPropertyValueException {
-        ensureNotNull(value);
+        Reject.ifNull(value);
 
         // Always make sure the name is a valid class name.
         validateClassName(value);

--
Gitblit v1.10.0