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/DurationPropertyDefinition.java | 13 +++++++------
1 files changed, 7 insertions(+), 6 deletions(-)
diff --git a/opendj3-server-dev/src/server/org/opends/server/admin/DurationPropertyDefinition.java b/opendj3-server-dev/src/server/org/opends/server/admin/DurationPropertyDefinition.java
index 64e3492..de31ee6 100644
--- a/opendj3-server-dev/src/server/org/opends/server/admin/DurationPropertyDefinition.java
+++ b/opendj3-server-dev/src/server/org/opends/server/admin/DurationPropertyDefinition.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.EnumSet;
@@ -135,7 +136,7 @@
* than the maximum unit.
*/
public final void setBaseUnit(String unit) throws IllegalArgumentException {
- ensureNotNull(unit);
+ ifNull(unit);
setBaseUnit(DurationUnit.getUnit(unit));
}
@@ -155,7 +156,7 @@
*/
public final void setBaseUnit(DurationUnit unit)
throws IllegalArgumentException {
- ensureNotNull(unit);
+ ifNull(unit);
// Make sure that the base unit is not bigger than the maximum
// unit.
@@ -462,7 +463,7 @@
*/
@Override
public void validateValue(Long value) throws IllegalPropertyValueException {
- ensureNotNull(value);
+ ifNull(value);
long nvalue = baseUnit.toMilliSeconds(value);
if (!allowUnlimited && nvalue < lowerLimit) {
@@ -485,7 +486,7 @@
*/
@Override
public String encodeValue(Long value) throws IllegalPropertyValueException {
- ensureNotNull(value);
+ ifNull(value);
// Make sure that we correctly encode negative values as
// "unlimited".
@@ -511,7 +512,7 @@
@Override
public Long decodeValue(String value)
throws IllegalPropertyValueStringException {
- ensureNotNull(value);
+ ifNull(value);
// First check for the special "unlimited" value when necessary.
if (allowUnlimited) {
--
Gitblit v1.10.0