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/plugins/LastModPlugin.java | 16 ++++++----------
1 files changed, 6 insertions(+), 10 deletions(-)
diff --git a/opendj-server-legacy/src/main/java/org/opends/server/plugins/LastModPlugin.java b/opendj-server-legacy/src/main/java/org/opends/server/plugins/LastModPlugin.java
index a5924d9..017d662 100644
--- a/opendj-server-legacy/src/main/java/org/opends/server/plugins/LastModPlugin.java
+++ b/opendj-server-legacy/src/main/java/org/opends/server/plugins/LastModPlugin.java
@@ -42,6 +42,7 @@
import org.opends.server.api.plugin.DirectoryServerPlugin;
import org.opends.server.api.plugin.PluginResult;
import org.opends.server.api.plugin.PluginType;
+import org.opends.server.core.DirectoryServer;
import org.opends.server.types.*;
import org.opends.server.types.operation.PreOperationAddOperation;
import org.opends.server.types.operation.PreOperationModifyDNOperation;
@@ -87,16 +88,11 @@
// Get the attribute types for the attributes that we will use. This needs
- // to be done in the constructor in order to make the associated variables
- // "final".
- createTimestampType =
- DirectoryConfig.getAttributeType(OP_ATTR_CREATE_TIMESTAMP_LC, true);
- creatorsNameType =
- DirectoryConfig.getAttributeType(OP_ATTR_CREATORS_NAME_LC, true);
- modifiersNameType =
- DirectoryConfig.getAttributeType(OP_ATTR_MODIFIERS_NAME_LC, true);
- modifyTimestampType =
- DirectoryConfig.getAttributeType(OP_ATTR_MODIFY_TIMESTAMP_LC, true);
+ // to be done in the constructor in order to make the associated variables "final".
+ createTimestampType = DirectoryServer.getAttributeTypeOrDefault(OP_ATTR_CREATE_TIMESTAMP_LC);
+ creatorsNameType = DirectoryServer.getAttributeTypeOrDefault(OP_ATTR_CREATORS_NAME_LC);
+ modifiersNameType = DirectoryServer.getAttributeTypeOrDefault(OP_ATTR_MODIFIERS_NAME_LC);
+ modifyTimestampType = DirectoryServer.getAttributeTypeOrDefault(OP_ATTR_MODIFY_TIMESTAMP_LC);
}
--
Gitblit v1.10.0