Use diamond operator
Change-Id: I9bb7e90ce7f45e65b4081a5bf85570b97e44712e
diff --git a/core/store/dist/src/main/java/org/onosproject/store/device/impl/DeviceDescriptions.java b/core/store/dist/src/main/java/org/onosproject/store/device/impl/DeviceDescriptions.java
index fd7fcd8..2320672 100644
--- a/core/store/dist/src/main/java/org/onosproject/store/device/impl/DeviceDescriptions.java
+++ b/core/store/dist/src/main/java/org/onosproject/store/device/impl/DeviceDescriptions.java
@@ -82,7 +82,7 @@
if (oldOne != null) {
SparseAnnotations merged = union(oldOne.value().annotations(),
newDesc.value().annotations());
- newOne = new Timestamped<DeviceDescription>(
+ newOne = new Timestamped<>(
new DefaultDeviceDescription(newDesc.value(), merged),
newDesc.timestamp());
}
@@ -104,27 +104,27 @@
switch (newDesc.value().type()) {
case OMS:
OmsPortDescription omsDesc = (OmsPortDescription) (newDesc.value());
- newOne = new Timestamped<PortDescription>(
+ newOne = new Timestamped<>(
new OmsPortDescription(
omsDesc, omsDesc.minFrequency(), omsDesc.maxFrequency(), omsDesc.grid(), merged),
newDesc.timestamp());
break;
case OCH:
OchPortDescription ochDesc = (OchPortDescription) (newDesc.value());
- newOne = new Timestamped<PortDescription>(
+ newOne = new Timestamped<>(
new OchPortDescription(
ochDesc, ochDesc.signalType(), ochDesc.isTunable(), ochDesc.lambda(), merged),
newDesc.timestamp());
break;
case ODUCLT:
OduCltPortDescription ocDesc = (OduCltPortDescription) (newDesc.value());
- newOne = new Timestamped<PortDescription>(
+ newOne = new Timestamped<>(
new OduCltPortDescription(
ocDesc, ocDesc.signalType(), merged),
newDesc.timestamp());
break;
default:
- newOne = new Timestamped<PortDescription>(
+ newOne = new Timestamped<>(
new DefaultPortDescription(newDesc.value(), merged),
newDesc.timestamp());
}
diff --git a/core/store/dist/src/main/java/org/onosproject/store/group/impl/DistributedGroupStore.java b/core/store/dist/src/main/java/org/onosproject/store/group/impl/DistributedGroupStore.java
index cf48dcb..97333eb 100644
--- a/core/store/dist/src/main/java/org/onosproject/store/group/impl/DistributedGroupStore.java
+++ b/core/store/dist/src/main/java/org/onosproject/store/group/impl/DistributedGroupStore.java
@@ -131,8 +131,7 @@
private ExecutorService messageHandlingExecutor;
private static final int MESSAGE_HANDLER_THREAD_POOL_SIZE = 1;
- private final HashMap<DeviceId, Boolean> deviceAuditStatus =
- new HashMap<DeviceId, Boolean>();
+ private final HashMap<DeviceId, Boolean> deviceAuditStatus = new HashMap<>();
private final AtomicInteger groupIdGen = new AtomicInteger();
@@ -685,8 +684,7 @@
UpdateType type,
GroupBuckets buckets) {
GroupBuckets oldBuckets = oldGroup.buckets();
- List<GroupBucket> newBucketList = new ArrayList<GroupBucket>(
- oldBuckets.buckets());
+ List<GroupBucket> newBucketList = new ArrayList<>(oldBuckets.buckets());
boolean groupDescUpdated = false;
if (type == UpdateType.ADD) {
diff --git a/core/store/dist/src/main/java/org/onosproject/store/link/impl/GossipLinkStore.java b/core/store/dist/src/main/java/org/onosproject/store/link/impl/GossipLinkStore.java
index 767ede5..105c77d 100644
--- a/core/store/dist/src/main/java/org/onosproject/store/link/impl/GossipLinkStore.java
+++ b/core/store/dist/src/main/java/org/onosproject/store/link/impl/GossipLinkStore.java
@@ -62,7 +62,6 @@
import org.slf4j.Logger;
import java.io.IOException;
-import java.util.Collection;
import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
@@ -551,7 +550,7 @@
*/
private static <K, V> SetMultimap<K, V> createSynchronizedHashMultiMap() {
return synchronizedSetMultimap(
- Multimaps.newSetMultimap(new ConcurrentHashMap<K, Collection<V>>(),
+ Multimaps.newSetMultimap(new ConcurrentHashMap<>(),
() -> Sets.newConcurrentHashSet()));
}
diff --git a/core/store/dist/src/main/java/org/onosproject/store/mastership/impl/RoleValue.java b/core/store/dist/src/main/java/org/onosproject/store/mastership/impl/RoleValue.java
index 9d3b168..5a38a34 100644
--- a/core/store/dist/src/main/java/org/onosproject/store/mastership/impl/RoleValue.java
+++ b/core/store/dist/src/main/java/org/onosproject/store/mastership/impl/RoleValue.java
@@ -45,9 +45,9 @@
* Constructs empty RoleValue.
*/
public RoleValue() {
- value.put(MastershipRole.MASTER, new LinkedList<NodeId>());
- value.put(MastershipRole.STANDBY, new LinkedList<NodeId>());
- value.put(MastershipRole.NONE, new LinkedList<NodeId>());
+ value.put(MastershipRole.MASTER, new LinkedList<>());
+ value.put(MastershipRole.STANDBY, new LinkedList<>());
+ value.put(MastershipRole.NONE, new LinkedList<>());
}
/**