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/DurationPropertyDefinition.java | 12 ++++++------
1 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/opendj-sdk/opendj-admin/src/main/java/org/opends/server/admin/DurationPropertyDefinition.java b/opendj-sdk/opendj-admin/src/main/java/org/opends/server/admin/DurationPropertyDefinition.java
index 454bc57..04d7ac0 100644
--- a/opendj-sdk/opendj-admin/src/main/java/org/opends/server/admin/DurationPropertyDefinition.java
+++ b/opendj-sdk/opendj-admin/src/main/java/org/opends/server/admin/DurationPropertyDefinition.java
@@ -26,7 +26,7 @@
package org.opends.server.admin;
-import static com.forgerock.opendj.util.Validator.*;
+import org.forgerock.util.Reject;
import java.util.EnumSet;
@@ -121,7 +121,7 @@
* maximum unit.
*/
public final void setBaseUnit(String unit) throws IllegalArgumentException {
- ensureNotNull(unit);
+ Reject.ifNull(unit);
setBaseUnit(DurationUnit.getUnit(unit));
}
@@ -138,7 +138,7 @@
* unit.
*/
public final void setBaseUnit(DurationUnit unit) throws IllegalArgumentException {
- ensureNotNull(unit);
+ Reject.ifNull(unit);
// Make sure that the base unit is not bigger than the maximum
// unit.
@@ -393,7 +393,7 @@
*/
@Override
public void validateValue(Long value) throws IllegalPropertyValueException {
- ensureNotNull(value);
+ Reject.ifNull(value);
long nvalue = baseUnit.toMilliSeconds(value);
if (!allowUnlimited && nvalue < lowerLimit) {
@@ -414,7 +414,7 @@
*/
@Override
public String encodeValue(Long value) throws IllegalPropertyValueException {
- ensureNotNull(value);
+ Reject.ifNull(value);
// Make sure that we correctly encode negative values as
// "unlimited".
@@ -437,7 +437,7 @@
*/
@Override
public Long decodeValue(String value) throws IllegalPropertyValueStringException {
- ensureNotNull(value);
+ Reject.ifNull(value);
// First check for the special "unlimited" value when necessary.
if (allowUnlimited) {
--
Gitblit v1.10.0