From 24a59808a15d20c81962616aebd883e43ad4f659 Mon Sep 17 00:00:00 2001
From: Matthew Swift <matthew.swift@forgerock.com>
Date: Thu, 19 May 2011 09:02:00 +0000
Subject: [PATCH] Use Exception.getMessage() instead of Exception.toString() where possible in order to avoid including the Exception type in error messages.
---
opendj3/opendj-sdk/src/main/java/org/opends/sdk/Matcher.java | 30 +++++++++++++++---------------
1 files changed, 15 insertions(+), 15 deletions(-)
diff --git a/opendj3/opendj-sdk/src/main/java/org/opends/sdk/Matcher.java b/opendj3/opendj-sdk/src/main/java/org/opends/sdk/Matcher.java
index 4c9b6fb..5a4d0a9 100644
--- a/opendj3/opendj-sdk/src/main/java/org/opends/sdk/Matcher.java
+++ b/opendj3/opendj-sdk/src/main/java/org/opends/sdk/Matcher.java
@@ -346,7 +346,7 @@
if (DEBUG_LOG.isLoggable(Level.WARNING))
{
DEBUG_LOG.warning("Attribute description " + attributeDescription
- + " is not recognized: " + e.toString());
+ + " is not recognized: " + e.getMessage());
}
return UNDEFINED;
}
@@ -370,7 +370,7 @@
if (DEBUG_LOG.isLoggable(Level.WARNING))
{
DEBUG_LOG.warning("The assertion value " + assertionValue
- + " is invalid: " + de.toString());
+ + " is invalid: " + de.getMessage());
}
return UNDEFINED;
}
@@ -395,7 +395,7 @@
if (DEBUG_LOG.isLoggable(Level.WARNING))
{
DEBUG_LOG.warning("Attribute description " + attributeDescription
- + " is not recognized: " + e.toString());
+ + " is not recognized: " + e.getMessage());
}
return UNDEFINED;
}
@@ -419,7 +419,7 @@
if (DEBUG_LOG.isLoggable(Level.WARNING))
{
DEBUG_LOG.warning("The assertion value " + assertionValue
- + " is invalid: " + de.toString());
+ + " is invalid: " + de.getMessage());
}
return UNDEFINED;
}
@@ -448,7 +448,7 @@
if (DEBUG_LOG.isLoggable(Level.WARNING))
{
DEBUG_LOG.warning("Matching rule " + matchingRule
- + " is not recognized: " + e.toString());
+ + " is not recognized: " + e.getMessage());
}
return UNDEFINED;
}
@@ -465,7 +465,7 @@
if (DEBUG_LOG.isLoggable(Level.WARNING))
{
DEBUG_LOG.warning("Attribute description " + attributeDescription
- + " is not recognized: " + e.toString());
+ + " is not recognized: " + e.getMessage());
}
return UNDEFINED;
}
@@ -534,7 +534,7 @@
if (DEBUG_LOG.isLoggable(Level.WARNING))
{
DEBUG_LOG.warning("The assertion value " + assertionValue
- + " is invalid: " + de.toString());
+ + " is invalid: " + de.getMessage());
}
return UNDEFINED;
}
@@ -560,7 +560,7 @@
if (DEBUG_LOG.isLoggable(Level.WARNING))
{
DEBUG_LOG.warning("Attribute description " + attributeDescription
- + " is not recognized: " + e.toString());
+ + " is not recognized: " + e.getMessage());
}
return UNDEFINED;
}
@@ -584,7 +584,7 @@
if (DEBUG_LOG.isLoggable(Level.WARNING))
{
DEBUG_LOG.warning("The assertion value " + assertionValue
- + " is invalid: " + de.toString());
+ + " is invalid: " + de.getMessage());
}
return UNDEFINED;
}
@@ -609,7 +609,7 @@
if (DEBUG_LOG.isLoggable(Level.WARNING))
{
DEBUG_LOG.warning("Attribute description " + attributeDescription
- + " is not recognized: " + e.toString());
+ + " is not recognized: " + e.getMessage());
}
return UNDEFINED;
}
@@ -633,7 +633,7 @@
if (DEBUG_LOG.isLoggable(Level.WARNING))
{
DEBUG_LOG.warning("The assertion value " + assertionValue
- + " is invalid: " + de.toString());
+ + " is invalid: " + de.getMessage());
}
return UNDEFINED;
}
@@ -688,7 +688,7 @@
if (DEBUG_LOG.isLoggable(Level.WARNING))
{
DEBUG_LOG.warning("Attribute description " + attributeDescription
- + " is not recognized: " + e.toString());
+ + " is not recognized: " + e.getMessage());
}
return UNDEFINED;
}
@@ -715,7 +715,7 @@
if (DEBUG_LOG.isLoggable(Level.WARNING))
{
DEBUG_LOG.warning("Attribute description " + attributeDescription
- + " is not recognized: " + e.toString());
+ + " is not recognized: " + e.getMessage());
}
return UNDEFINED;
}
@@ -741,7 +741,7 @@
{
DEBUG_LOG
.warning("The substring assertion values contain an invalid value: "
- + de.toString());
+ + de.getMessage());
}
return UNDEFINED;
}
@@ -811,7 +811,7 @@
{
DEBUG_LOG.warning("The attribute value " + v.toString() + " is "
+ "invalid for matching rule " + rule.getNameOrOID()
- + ". Possible schema error? : " + de.toString());
+ + ". Possible schema error? : " + de.getMessage());
}
return ConditionResult.UNDEFINED;
}
--
Gitblit v1.10.0