From a1f030edc5d19b575470f0d79033d9f7471ab172 Mon Sep 17 00:00:00 2001
From: Jean-Noel Rouvignac <jean-noel.rouvignac@forgerock.com>
Date: Fri, 31 Jan 2014 14:49:58 +0000
Subject: [PATCH] Removed now useless calls to .toString() on arguments of ArgN.get(...).
---
opendj3-server-dev/src/server/org/opends/server/plugins/UniqueAttributePlugin.java | 30 +++++++++++-------------------
1 files changed, 11 insertions(+), 19 deletions(-)
diff --git a/opendj3-server-dev/src/server/org/opends/server/plugins/UniqueAttributePlugin.java b/opendj3-server-dev/src/server/org/opends/server/plugins/UniqueAttributePlugin.java
index 69a314d..6f63485 100644
--- a/opendj3-server-dev/src/server/org/opends/server/plugins/UniqueAttributePlugin.java
+++ b/opendj3-server-dev/src/server/org/opends/server/plugins/UniqueAttributePlugin.java
@@ -144,9 +144,7 @@
if ((b != null) && (! b.isIndexed(t, IndexType.EQUALITY)))
{
throw new ConfigException(ERR_PLUGIN_UNIQUEATTR_ATTR_UNINDEXED.get(
- configuration.dn().toString(),
- t.getNameOrOID(),
- b.getBackendID()));
+ configuration.dn(), t.getNameOrOID(), b.getBackendID()));
}
}
}
@@ -322,8 +320,7 @@
uniqueAttrValue2Dn.remove(v2);
}
LocalizableMessage msg = ERR_PLUGIN_UNIQUEATTR_ATTR_NOT_UNIQUE.get(
- t.getNameOrOID(), v.getValue().toString(),
- conflictDN.toString());
+ t.getNameOrOID(), v.getValue(), conflictDN);
return PluginResult.PreOperation.stopProcessing(
ResultCode.CONSTRAINT_VIOLATION, msg);
}
@@ -332,10 +329,8 @@
{
logger.traceException(de);
- LocalizableMessage message =
- ERR_PLUGIN_UNIQUEATTR_INTERNAL_ERROR.get(
- de.getResultCode().toString(),
- de.getMessageObject());
+ LocalizableMessage message = ERR_PLUGIN_UNIQUEATTR_INTERNAL_ERROR.get(
+ de.getResultCode(), de.getMessageObject());
// Try some cleanup before returning, to avoid memory leaks
for (AttributeValue v2 : recordedValues)
@@ -555,9 +550,9 @@
t.getNameOrOID(),
operation.getConnectionID(),
operation.getOperationID(),
- v.getValue().toString(),
- updatedEntryDN.toString(),
- conflictDN.toString());
+ v.getValue(),
+ updatedEntryDN,
+ conflictDN);
DirectoryServer.sendAlertNotification(this,
ALERT_TYPE_UNIQUE_ATTR_SYNC_CONFLICT,
message);
@@ -570,8 +565,8 @@
LocalizableMessage message = ERR_PLUGIN_UNIQUEATTR_INTERNAL_ERROR_SYNC.get(
operation.getConnectionID(),
operation.getOperationID(),
- updatedEntryDN.toString(),
- de.getResultCode().toString(),
+ updatedEntryDN,
+ de.getResultCode(),
de.getMessageObject());
DirectoryServer.sendAlertNotification(this,
ALERT_TYPE_UNIQUE_ATTR_SYNC_ERROR, message);
@@ -731,9 +726,7 @@
break;
default:
- LocalizableMessage message = ERR_PLUGIN_UNIQUEATTR_INVALID_PLUGIN_TYPE.get(
- pluginType.toString());
- unacceptableReasons.add(message);
+ unacceptableReasons.add(ERR_PLUGIN_UNIQUEATTR_INVALID_PLUGIN_TYPE.get(pluginType));
configAcceptable = false;
}
}
@@ -752,8 +745,7 @@
if ((b != null) && (! b.isIndexed(t, IndexType.EQUALITY)))
{
unacceptableReasons.add(ERR_PLUGIN_UNIQUEATTR_ATTR_UNINDEXED.get(
- configuration.dn().toString(),
- t.getNameOrOID(), b.getBackendID()));
+ configuration.dn(), t.getNameOrOID(), b.getBackendID()));
configAcceptable = false;
}
}
--
Gitblit v1.10.0