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/protocol/TopologyMsg.java | 15 +++++++--------
1 files changed, 7 insertions(+), 8 deletions(-)
diff --git a/opendj-server-legacy/src/main/java/org/opends/server/replication/protocol/TopologyMsg.java b/opendj-server-legacy/src/main/java/org/opends/server/replication/protocol/TopologyMsg.java
index 20ea943..8cfe004 100644
--- a/opendj-server-legacy/src/main/java/org/opends/server/replication/protocol/TopologyMsg.java
+++ b/opendj-server-legacy/src/main/java/org/opends/server/replication/protocol/TopologyMsg.java
@@ -22,7 +22,7 @@
*
*
* Copyright 2007-2010 Sun Microsystems, Inc.
- * Portions Copyright 2011-2014 ForgeRock AS
+ * Portions Copyright 2011-2015 ForgeRock AS
*/
package org.opends.server.replication.protocol;
@@ -79,8 +79,7 @@
// Read the DS info entries, first read number of them
int nDsInfo = scanner.nextByte();
- final Map<Integer, DSInfo> replicaInfos =
- new HashMap<Integer, DSInfo>(Math.max(0, nDsInfo));
+ final Map<Integer, DSInfo> replicaInfos = new HashMap<>(Math.max(0, nDsInfo));
while (nDsInfo > 0 && !scanner.isEmpty())
{
final DSInfo dsInfo = nextDSInfo(scanner, version);
@@ -90,7 +89,7 @@
// Read the RS info entries
int nRsInfo = scanner.nextByte();
- final List<RSInfo> rsInfos = new ArrayList<RSInfo>(Math.max(0, nRsInfo));
+ final List<RSInfo> rsInfos = new ArrayList<>(Math.max(0, nRsInfo));
while (nRsInfo > 0 && !scanner.isEmpty())
{
rsInfos.add(nextRSInfo(scanner, version));
@@ -115,11 +114,11 @@
final byte safeDataLevel = scanner.nextByte();
final byte groupId = scanner.nextByte();
- final List<String> refUrls = new ArrayList<String>();
+ final List<String> refUrls = new ArrayList<>();
scanner.nextStrings(refUrls);
- final Set<String> attrs = new HashSet<String>();
- final Set<String> delattrs = new HashSet<String>();
+ final Set<String> attrs = new HashSet<>();
+ final Set<String> delattrs = new HashSet<>();
short protocolVersion = -1;
if (version >= REPLICATION_PROTOCOL_V4)
{
@@ -175,7 +174,7 @@
}
else
{
- Map<Integer, DSInfo> replicas = new HashMap<Integer, DSInfo>();
+ Map<Integer, DSInfo> replicas = new HashMap<>();
for (DSInfo dsInfo : dsInfos)
{
replicas.put(dsInfo.getDsId(), dsInfo);
--
Gitblit v1.10.0