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/tools/LDIFModify.java | 31 ++++++++++++-------------------
1 files changed, 12 insertions(+), 19 deletions(-)
diff --git a/opendj-server-legacy/src/main/java/org/opends/server/tools/LDIFModify.java b/opendj-server-legacy/src/main/java/org/opends/server/tools/LDIFModify.java
index ec5e22c..d8ccf4f 100644
--- a/opendj-server-legacy/src/main/java/org/opends/server/tools/LDIFModify.java
+++ b/opendj-server-legacy/src/main/java/org/opends/server/tools/LDIFModify.java
@@ -133,14 +133,10 @@
throws IOException, LDIFException
{
// Read the changes into memory.
- TreeMap<DN,AddChangeRecordEntry> adds =
- new TreeMap<DN,AddChangeRecordEntry>();
- TreeMap<DN,Entry> ldifEntries =
- new TreeMap<DN,Entry>();
- HashMap<DN,DeleteChangeRecordEntry> deletes =
- new HashMap<DN,DeleteChangeRecordEntry>();
- HashMap<DN,LinkedList<Modification>> modifications =
- new HashMap<DN,LinkedList<Modification>>();
+ TreeMap<DN,AddChangeRecordEntry> adds = new TreeMap<>();
+ TreeMap<DN,Entry> ldifEntries = new TreeMap<>();
+ HashMap<DN,DeleteChangeRecordEntry> deletes = new HashMap<>();
+ HashMap<DN,LinkedList<Modification>> modifications = new HashMap<>();
while (true)
{
@@ -212,7 +208,7 @@
modifications.get(changeDN);
if (mods == null)
{
- mods = new LinkedList<Modification>();
+ mods = new LinkedList<>();
modifications.put(changeDN, mods);
}
@@ -314,12 +310,9 @@
// Perform any adds that may be necessary.
for (AddChangeRecordEntry add : adds.values())
{
- Map<ObjectClass,String> objectClasses =
- new LinkedHashMap<ObjectClass,String>();
- Map<AttributeType,List<Attribute>> userAttributes =
- new LinkedHashMap<AttributeType,List<Attribute>>();
- Map<AttributeType,List<Attribute>> operationalAttributes =
- new LinkedHashMap<AttributeType,List<Attribute>>();
+ Map<ObjectClass,String> objectClasses = new LinkedHashMap<>();
+ Map<AttributeType,List<Attribute>> userAttributes = new LinkedHashMap<>();
+ Map<AttributeType,List<Attribute>> operationalAttributes = new LinkedHashMap<>();
for (Attribute a : add.getAttributes())
{
@@ -339,7 +332,7 @@
List<Attribute> attrList = operationalAttributes.get(t);
if (attrList == null)
{
- attrList = new LinkedList<Attribute>();
+ attrList = new LinkedList<>();
operationalAttributes.put(t, attrList);
}
attrList.add(a);
@@ -349,7 +342,7 @@
List<Attribute> attrList = userAttributes.get(t);
if (attrList == null)
{
- attrList = new LinkedList<Attribute>();
+ attrList = new LinkedList<>();
userAttributes.put(t, attrList);
}
attrList.add(a);
@@ -637,8 +630,8 @@
}
- // Actually invoke the LDIF procesing.
- LinkedList<LocalizableMessage> errorList = new LinkedList<LocalizableMessage>();
+ // Actually invoke the LDIF processing.
+ LinkedList<LocalizableMessage> errorList = new LinkedList<>();
boolean successful;
try
{
--
Gitblit v1.10.0