From 601871e0439dace930b02b74ec8f45b962554663 Mon Sep 17 00:00:00 2001
From: davidely <davidely@localhost>
Date: Tue, 10 Oct 2006 00:27:04 +0000
Subject: [PATCH] Added ensureNotNull and ensureTrue functionality via the new Validator class. Thanks to Neil and Andy for the reviews.
---
opends/src/server/org/opends/server/messages/UtilityMessages.java | 13 +++++++++++++
1 files changed, 13 insertions(+), 0 deletions(-)
diff --git a/opends/src/server/org/opends/server/messages/UtilityMessages.java b/opends/src/server/org/opends/server/messages/UtilityMessages.java
index b3dafb2..d6be681 100644
--- a/opends/src/server/org/opends/server/messages/UtilityMessages.java
+++ b/opends/src/server/org/opends/server/messages/UtilityMessages.java
@@ -1583,6 +1583,14 @@
CATEGORY_MASK_UTIL | SEVERITY_MASK_MILD_ERROR | 147;
+ /**
+ * The message ID for the message that will be used if a Validator check
+ * fails. This signals that there is a method invocation that violates
+ * the pre-conditions of the method.
+ */
+ public static final int MSGID_VALIDATOR_PRECONDITION_NOT_MET =
+ CATEGORY_MASK_UTIL | SEVERITY_MASK_SEVERE_ERROR | 148;
+
/**
* Associates a set of generic messages with the message IDs defined in this
@@ -2108,6 +2116,11 @@
"file mode. UNIX file modes must be a three-character " +
"string in which each character is a numeric digit " +
"between zero and seven.");
+
+ registerMessage(MSGID_VALIDATOR_PRECONDITION_NOT_MET,
+ "A precondition of the invoked method was not met. This " +
+ "This usually means there is a defect somewhere in the " +
+ "call stack. Details: %s");
}
}
--
Gitblit v1.10.0