From a89f7014aeb71dba5c94404dfea7eb89e7eeee74 Mon Sep 17 00:00:00 2001
From: Jean-Noel Rouvignac <jean-noel.rouvignac@forgerock.com>
Date: Wed, 08 Jul 2015 06:48:02 +0000
Subject: [PATCH] AutoRefactor'ed Use Diamond Operator
---
opendj-server-legacy/src/main/java/org/opends/server/replication/plugin/EntryHistorical.java | 10 ++++------
1 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/opendj-server-legacy/src/main/java/org/opends/server/replication/plugin/EntryHistorical.java b/opendj-server-legacy/src/main/java/org/opends/server/replication/plugin/EntryHistorical.java
index f1153d4..53af3b0 100644
--- a/opendj-server-legacy/src/main/java/org/opends/server/replication/plugin/EntryHistorical.java
+++ b/opendj-server-legacy/src/main/java/org/opends/server/replication/plugin/EntryHistorical.java
@@ -154,8 +154,7 @@
* Contains Historical information for each attribute sorted by attribute
* type. key:AttributeType value:AttrInfoWithOptions
*/
- private HashMap<AttributeType,AttrHistoricalWithOptions> attributesHistorical
- = new HashMap<AttributeType,AttrHistoricalWithOptions>();
+ private final HashMap<AttributeType,AttrHistoricalWithOptions> attributesHistorical = new HashMap<>();
/** {@inheritDoc} */
@Override
@@ -324,7 +323,7 @@
Attribute attr = Attributes.create(historicalAttrType, attrValue);
// Set the created attribute to the operation
- List<Attribute> attrList = new LinkedList<Attribute>();
+ List<Attribute> attrList = new LinkedList<>();
attrList.add(attr);
addOperation.setAttribute(historicalAttrType, attrList);
}
@@ -629,7 +628,7 @@
public static EntryHistorical newInstanceFromEntry(Entry entry)
{
AttributeType lastAttrType = null;
- Set<String> lastOptions = new HashSet<String>();
+ Set<String> lastOptions = new HashSet<>();
AttrHistorical attrInfo = null;
AttrHistoricalWithOptions attrInfoWithOptions = null;
@@ -750,8 +749,7 @@
*/
public static Iterable<FakeOperation> generateFakeOperations(Entry entry)
{
- TreeMap<CSN, FakeOperation> operations =
- new TreeMap<CSN, FakeOperation>();
+ TreeMap<CSN, FakeOperation> operations = new TreeMap<>();
List<Attribute> attrs = getHistoricalAttr(entry);
if (attrs != null)
{
--
Gitblit v1.10.0