From d46701cdbecec6f6c10f57432f3e6a484752f42c Mon Sep 17 00:00:00 2001
From: Matthew Swift <matthew.swift@forgerock.com>
Date: Sat, 18 Jan 2014 00:55:24 +0000
Subject: [PATCH] Simplify config framework exception hierarchy by removing and pulling up the following exceptions:
---
opendj3-server-dev/src/server/org/opends/server/admin/IntegerPropertyDefinition.java | 18 +++++++++---------
1 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/opendj3-server-dev/src/server/org/opends/server/admin/IntegerPropertyDefinition.java b/opendj3-server-dev/src/server/org/opends/server/admin/IntegerPropertyDefinition.java
index f590408e..2902aa7 100644
--- a/opendj3-server-dev/src/server/org/opends/server/admin/IntegerPropertyDefinition.java
+++ b/opendj3-server-dev/src/server/org/opends/server/admin/IntegerPropertyDefinition.java
@@ -276,19 +276,19 @@
*/
@Override
public void validateValue(Integer value)
- throws IllegalPropertyValueException {
+ throws PropertyException {
ifNull(value);
if (!allowUnlimited && value < lowerLimit) {
- throw new IllegalPropertyValueException(this, value);
+ throw PropertyException.illegalPropertyValueException(this, value);
// unlimited allowed
} else if (value >= 0 && value < lowerLimit) {
- throw new IllegalPropertyValueException(this, value);
+ throw PropertyException.illegalPropertyValueException(this, value);
}
if ((upperLimit != null) && (value > upperLimit)) {
- throw new IllegalPropertyValueException(this, value);
+ throw PropertyException.illegalPropertyValueException(this, value);
}
}
@@ -297,7 +297,7 @@
*/
@Override
public String encodeValue(Integer value)
- throws IllegalPropertyValueException {
+ throws PropertyException {
ifNull(value);
// Make sure that we correctly encode negative values as "unlimited".
@@ -315,7 +315,7 @@
*/
@Override
public Integer decodeValue(String value)
- throws IllegalPropertyValueStringException {
+ throws PropertyException {
ifNull(value);
if (allowUnlimited) {
@@ -328,13 +328,13 @@
try {
i = Integer.valueOf(value);
} catch (NumberFormatException e) {
- throw new IllegalPropertyValueStringException(this, value);
+ throw PropertyException.illegalPropertyValueException(this, value);
}
try {
validateValue(i);
- } catch (IllegalPropertyValueException e) {
- throw new IllegalPropertyValueStringException(this, value);
+ } catch (PropertyException e) {
+ throw PropertyException.illegalPropertyValueException(this, value);
}
return i;
--
Gitblit v1.10.0