From c5740d7b39334af983957a9c284ddd792d598f6c Mon Sep 17 00:00:00 2001
From: Jean-Noel Rouvignac <jean-noel.rouvignac@forgerock.com>
Date: Fri, 10 Jul 2015 15:13:20 +0000
Subject: [PATCH] Code cleanup
---
opendj-server-legacy/src/main/java/org/opends/server/backends/TrustStoreBackend.java | 17 ++++++-----------
1 files changed, 6 insertions(+), 11 deletions(-)
diff --git a/opendj-server-legacy/src/main/java/org/opends/server/backends/TrustStoreBackend.java b/opendj-server-legacy/src/main/java/org/opends/server/backends/TrustStoreBackend.java
index e3ef97f..00f18d4 100644
--- a/opendj-server-legacy/src/main/java/org/opends/server/backends/TrustStoreBackend.java
+++ b/opendj-server-legacy/src/main/java/org/opends/server/backends/TrustStoreBackend.java
@@ -433,8 +433,7 @@
throws DirectoryException
{
// Make sure that the DN specifies a certificate alias.
- AttributeType t =
- DirectoryServer.getAttributeType(ATTR_CRYPTO_KEY_ID, true);
+ AttributeType t = DirectoryServer.getAttributeTypeOrDefault(ATTR_CRYPTO_KEY_ID);
ByteString v = entryDN.rdn().getAttributeValue(t);
if (v == null)
{
@@ -477,7 +476,7 @@
userAttrs.put(t, Attributes.createAsList(t, v));
- t = DirectoryServer.getAttributeType(ATTR_CRYPTO_PUBLIC_KEY_CERTIFICATE, true);
+ t = DirectoryServer.getAttributeTypeOrDefault(ATTR_CRYPTO_PUBLIC_KEY_CERTIFICATE);
AttributeBuilder builder = new AttributeBuilder(t);
builder.setOption("binary");
builder.add(certValue);
@@ -600,12 +599,10 @@
if (scope != SearchScope.BASE_OBJECT && aliases.length != 0)
{
- AttributeType certAliasType =
- DirectoryServer.getAttributeType(ATTR_CRYPTO_KEY_ID, true);
+ AttributeType certAliasType = DirectoryServer.getAttributeTypeOrDefault(ATTR_CRYPTO_KEY_ID);
for (String alias : aliases)
{
- DN certDN = makeChildDN(this.baseDN, certAliasType,
- alias);
+ DN certDN = makeChildDN(this.baseDN, certAliasType, alias);
Entry certEntry;
try
@@ -1196,8 +1193,7 @@
DN entryDN = entry.getName();
// Make sure that the DN specifies a certificate alias.
- AttributeType t =
- DirectoryServer.getAttributeType(ATTR_CRYPTO_KEY_ID, true);
+ AttributeType t = DirectoryServer.getAttributeTypeOrDefault(ATTR_CRYPTO_KEY_ID);
ByteString v = entryDN.rdn().getAttributeValue(t);
if (v == null)
{
@@ -1322,8 +1318,7 @@
throws DirectoryException
{
// Make sure that the DN specifies a certificate alias.
- AttributeType t =
- DirectoryServer.getAttributeType(ATTR_CRYPTO_KEY_ID, true);
+ AttributeType t = DirectoryServer.getAttributeTypeOrDefault(ATTR_CRYPTO_KEY_ID);
ByteString v = entryDN.rdn().getAttributeValue(t);
if (v == null)
{
--
Gitblit v1.10.0