From cad9f27d3ba6753e2bf3176c3c71b0e07e73f1b8 Mon Sep 17 00:00:00 2001
From: Jean-Noel Rouvignac <jean-noel.rouvignac@forgerock.com>
Date: Mon, 05 Jan 2015 15:12:36 +0000
Subject: [PATCH] Removed unused import static org.opends.server.util.StaticUtils.*;

---
 opendj3-server-dev/src/server/org/opends/server/replication/plugin/EntryHistorical.java           |   35 ++++++++++++++++++++++-------------
 opendj3-server-dev/src/server/org/opends/server/plugins/EntryUUIDPlugin.java                      |    7 +++----
 opendj3-server-dev/src/server/org/opends/server/extensions/EntryUUIDVirtualAttributeProvider.java |    7 +++----
 3 files changed, 28 insertions(+), 21 deletions(-)

diff --git a/opendj3-server-dev/src/server/org/opends/server/extensions/EntryUUIDVirtualAttributeProvider.java b/opendj3-server-dev/src/server/org/opends/server/extensions/EntryUUIDVirtualAttributeProvider.java
index 3034e55..0e7e56e 100644
--- a/opendj3-server-dev/src/server/org/opends/server/extensions/EntryUUIDVirtualAttributeProvider.java
+++ b/opendj3-server-dev/src/server/org/opends/server/extensions/EntryUUIDVirtualAttributeProvider.java
@@ -26,6 +26,8 @@
  */
 package org.opends.server.extensions;
 
+import static org.opends.messages.ExtensionMessages.*;
+
 import java.util.List;
 import java.util.UUID;
 
@@ -34,8 +36,8 @@
 import org.forgerock.opendj.ldap.ByteString;
 import org.forgerock.opendj.ldap.ConditionResult;
 import org.forgerock.opendj.ldap.ResultCode;
-import org.opends.server.admin.std.server.EntryUUIDVirtualAttributeCfg;
 import org.forgerock.opendj.ldap.schema.MatchingRule;
+import org.opends.server.admin.std.server.EntryUUIDVirtualAttributeCfg;
 import org.opends.server.api.VirtualAttributeProvider;
 import org.opends.server.core.SearchOperation;
 import org.opends.server.types.Attribute;
@@ -43,9 +45,6 @@
 import org.opends.server.types.Entry;
 import org.opends.server.types.VirtualAttributeRule;
 
-import static org.opends.messages.ExtensionMessages.*;
-import static org.opends.server.util.StaticUtils.*;
-
 /**
  * This class implements a virtual attribute provider that is meant to serve the
  * entryUUID operational attribute as described in RFC 4530.  Note that this
diff --git a/opendj3-server-dev/src/server/org/opends/server/plugins/EntryUUIDPlugin.java b/opendj3-server-dev/src/server/org/opends/server/plugins/EntryUUIDPlugin.java
index 0ce45f7..c897e31 100644
--- a/opendj3-server-dev/src/server/org/opends/server/plugins/EntryUUIDPlugin.java
+++ b/opendj3-server-dev/src/server/org/opends/server/plugins/EntryUUIDPlugin.java
@@ -26,6 +26,8 @@
  */
 package org.opends.server.plugins;
 
+import static org.opends.messages.PluginMessages.*;
+
 import java.util.ArrayList;
 import java.util.Collections;
 import java.util.List;
@@ -34,6 +36,7 @@
 import java.util.UUID;
 
 import org.forgerock.i18n.LocalizableMessage;
+import org.forgerock.opendj.config.server.ConfigException;
 import org.forgerock.opendj.ldap.schema.AttributeUsage;
 import org.opends.server.admin.server.ConfigurationChangeListener;
 import org.opends.server.admin.std.meta.PluginCfgDefn;
@@ -42,13 +45,9 @@
 import org.opends.server.api.plugin.DirectoryServerPlugin;
 import org.opends.server.api.plugin.PluginResult;
 import org.opends.server.api.plugin.PluginType;
-import org.forgerock.opendj.config.server.ConfigException;
 import org.opends.server.types.*;
 import org.opends.server.types.operation.PreOperationAddOperation;
 
-import static org.opends.messages.PluginMessages.*;
-import static org.opends.server.util.StaticUtils.*;
-
 /**
  * This class implements a Directory Server plugin that will add the entryUUID
  * attribute to an entry whenever it is added or imported as per RFC 4530.  For
diff --git a/opendj3-server-dev/src/server/org/opends/server/replication/plugin/EntryHistorical.java b/opendj3-server-dev/src/server/org/opends/server/replication/plugin/EntryHistorical.java
index a8f1077..5dc8d08 100644
--- a/opendj3-server-dev/src/server/org/opends/server/replication/plugin/EntryHistorical.java
+++ b/opendj3-server-dev/src/server/org/opends/server/replication/plugin/EntryHistorical.java
@@ -26,6 +26,8 @@
  */
 package org.opends.server.replication.plugin;
 
+import static org.opends.messages.ReplicationMessages.*;
+
 import java.util.*;
 
 import org.forgerock.i18n.slf4j.LocalizedLogger;
@@ -40,9 +42,6 @@
 import org.opends.server.types.operation.PreOperationModifyOperation;
 import org.opends.server.util.TimeThread;
 
-import static org.opends.messages.ReplicationMessages.*;
-import static org.opends.server.util.StaticUtils.*;
-
 /**
  * This class is used to store historical information that is
  * used to resolve modify conflicts
@@ -97,13 +96,13 @@
    * an entry that has no historical attribute and after the last
    * historical has been purged.
    */
-  private CSN oldestCSN = null;
+  private CSN oldestCSN;
 
   /**
    * For stats/monitoring purpose, the number of historical values
    * purged the last time a purge has been applied on this entry historical.
    */
-  private int lastPurgedValuesCount = 0;
+  private int lastPurgedValuesCount;
 
 
   /**
@@ -146,10 +145,10 @@
    */
 
   /** The date when the entry was added. */
-  private CSN entryADDDate = null;
+  private CSN entryADDDate;
 
   /** The date when the entry was last renamed. */
-  private CSN entryMODDNDate = null;
+  private CSN entryMODDNDate;
 
   /**
    * Contains Historical information for each attribute sorted by attribute
@@ -158,9 +157,7 @@
   private HashMap<AttributeType,AttrHistoricalWithOptions> attributesHistorical
     = new HashMap<AttributeType,AttrHistoricalWithOptions>();
 
-  /**
-   * {@inheritDoc}
-   */
+  /** {@inheritDoc} */
   @Override
   public String toString()
   {
@@ -244,7 +241,9 @@
         // (eventually read from the provided modification)
         AttrHistorical attrHist = getOrCreateAttrHistorical(mod);
         if (attrHist != null)
+        {
           attrHist.processLocalOrNonConflictModification(csn, mod);
+        }
       }
     }
 
@@ -423,7 +422,9 @@
     // the potentially set purge delay.
     this.lastPurgedValuesCount = 0;
     if (purgeDelayInMillisec>0)
+    {
       purgeDate = TimeThread.getTime() - purgeDelayInMillisec;
+    }
 
     AttributeType historicalAttrType =
       DirectoryServer.getSchema().getAttributeType(HISTORICAL_ATTRIBUTE_NAME);
@@ -597,15 +598,22 @@
   public CSN getDNDate()
   {
     if (entryADDDate == null)
+    {
       return entryMODDNDate;
-
+    }
     if (entryMODDNDate == null)
+    {
       return entryADDDate;
+    }
 
     if (entryMODDNDate.isOlderThan(entryADDDate))
+    {
       return entryMODDNDate;
+    }
     else
+    {
       return entryADDDate;
+    }
   }
 
   /**
@@ -859,8 +867,7 @@
   public static boolean isHistoricalAttribute(Attribute attr)
   {
     AttributeType attrType = attr.getAttributeType();
-    return
-      attrType.getNameOrOID().equals(EntryHistorical.HISTORICAL_ATTRIBUTE_NAME);
+    return EntryHistorical.HISTORICAL_ATTRIBUTE_NAME.equals(attrType.getNameOrOID());
   }
 
   /**
@@ -873,7 +880,9 @@
   {
     if (csn != null
         && (this.oldestCSN == null || csn.isOlderThan(this.oldestCSN)))
+    {
       this.oldestCSN = csn;
+    }
   }
 
   /**

--
Gitblit v1.10.0