Remove explicit type parameters which can be inferred
Change-Id: I62cd4df252bab6208e1b1cd37f8f8757b0cfc17e
diff --git a/core/store/dist/src/main/java/org/onosproject/store/device/impl/GossipDeviceStore.java b/core/store/dist/src/main/java/org/onosproject/store/device/impl/GossipDeviceStore.java
index d38821f..8e2a370 100644
--- a/core/store/dist/src/main/java/org/onosproject/store/device/impl/GossipDeviceStore.java
+++ b/core/store/dist/src/main/java/org/onosproject/store/device/impl/GossipDeviceStore.java
@@ -783,7 +783,7 @@
// exist, it creates and registers a new one.
private ConcurrentMap<PortNumber, Port> getPortMap(DeviceId deviceId) {
return createIfAbsentUnchecked(devicePorts, deviceId,
- NewConcurrentHashMap.<PortNumber, Port>ifNeeded());
+ NewConcurrentHashMap.ifNeeded());
}
private Map<ProviderId, DeviceDescriptions> getOrCreateDeviceDescriptionsMap(
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 764fe9e..554ef2a 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
@@ -241,12 +241,12 @@
private static NewConcurrentHashMap<GroupId, Group>
lazyEmptyExtraneousGroupIdTable() {
- return NewConcurrentHashMap.<GroupId, Group>ifNeeded();
+ return NewConcurrentHashMap.ifNeeded();
}
private static NewConcurrentHashMap<GroupId, StoredGroupEntry>
lazyEmptyGroupIdTable() {
- return NewConcurrentHashMap.<GroupId, StoredGroupEntry>ifNeeded();
+ return NewConcurrentHashMap.ifNeeded();
}
/**
diff --git a/core/store/dist/src/main/java/org/onosproject/store/topology/impl/DistributedTopologyStore.java b/core/store/dist/src/main/java/org/onosproject/store/topology/impl/DistributedTopologyStore.java
index 0b26ef4..cbfacad 100644
--- a/core/store/dist/src/main/java/org/onosproject/store/topology/impl/DistributedTopologyStore.java
+++ b/core/store/dist/src/main/java/org/onosproject/store/topology/impl/DistributedTopologyStore.java
@@ -30,7 +30,6 @@
import org.onosproject.event.Event;
import org.onosproject.mastership.MastershipService;
import org.onosproject.net.ConnectPoint;
-import org.onosproject.net.Device;
import org.onosproject.net.DeviceId;
import org.onosproject.net.DisjointPath;
import org.onosproject.net.Link;
@@ -96,8 +95,8 @@
private volatile DefaultTopology current =
new DefaultTopology(ProviderId.NONE,
new DefaultGraphDescription(0L, System.currentTimeMillis(),
- Collections.<Device>emptyList(),
- Collections.<Link>emptyList()));
+ Collections.emptyList(),
+ Collections.emptyList()));
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
protected StorageService storageService;
diff --git a/core/store/dist/src/test/java/org/onosproject/store/device/impl/GossipDeviceStoreTest.java b/core/store/dist/src/test/java/org/onosproject/store/device/impl/GossipDeviceStoreTest.java
index bda9e9a..9c9ef2c 100644
--- a/core/store/dist/src/test/java/org/onosproject/store/device/impl/GossipDeviceStoreTest.java
+++ b/core/store/dist/src/test/java/org/onosproject/store/device/impl/GossipDeviceStoreTest.java
@@ -133,7 +133,7 @@
private static final NodeId NID2 = new NodeId("remote");
private static final ControllerNode ONOS2 =
new DefaultControllerNode(NID2, IpAddress.valueOf("127.0.0.2"));
- private static final List<SparseAnnotations> NO_ANNOTATION = Collections.<SparseAnnotations>emptyList();
+ private static final List<SparseAnnotations> NO_ANNOTATION = Collections.emptyList();
EventuallyConsistentMapBuilder ecMapBuilder;
EventuallyConsistentMap ecMap;
@@ -492,7 +492,7 @@
@Test
public final void testUpdatePorts() {
putDevice(DID1, SW1);
- List<PortDescription> pds = Arrays.<PortDescription>asList(
+ List<PortDescription> pds = Arrays.asList(
new DefaultPortDescription(P1, true),
new DefaultPortDescription(P2, true)
);
@@ -517,7 +517,7 @@
assertTrue("Event for all expectedport appeared", expectedPorts.isEmpty());
- List<PortDescription> pds2 = Arrays.<PortDescription>asList(
+ List<PortDescription> pds2 = Arrays.asList(
new DefaultPortDescription(P1, false),
new DefaultPortDescription(P2, true),
new DefaultPortDescription(P3, true)
@@ -547,7 +547,7 @@
}
}
- List<PortDescription> pds3 = Arrays.<PortDescription>asList(
+ List<PortDescription> pds3 = Arrays.asList(
new DefaultPortDescription(P1, false),
new DefaultPortDescription(P2, true)
);
@@ -577,7 +577,7 @@
@Test
public final void testUpdatePortStatus() {
putDevice(DID1, SW1);
- List<PortDescription> pds = Arrays.<PortDescription>asList(
+ List<PortDescription> pds = Arrays.asList(
new DefaultPortDescription(P1, true)
);
deviceStore.updatePorts(PID, DID1, pds);
@@ -602,7 +602,7 @@
public final void testUpdatePortStatusAncillary() throws IOException {
putDeviceAncillary(DID1, SW1);
putDevice(DID1, SW1);
- List<PortDescription> pds = Arrays.<PortDescription>asList(
+ List<PortDescription> pds = Arrays.asList(
new DefaultPortDescription(P1, true, A1)
);
deviceStore.updatePorts(PID, DID1, pds);
@@ -727,7 +727,7 @@
public final void testGetPorts() {
putDevice(DID1, SW1);
putDevice(DID2, SW1);
- List<PortDescription> pds = Arrays.<PortDescription>asList(
+ List<PortDescription> pds = Arrays.asList(
new DefaultPortDescription(P1, true),
new DefaultPortDescription(P2, true)
);
@@ -750,7 +750,7 @@
public final void testGetPort() {
putDevice(DID1, SW1);
putDevice(DID2, SW1);
- List<PortDescription> pds = Arrays.<PortDescription>asList(
+ List<PortDescription> pds = Arrays.asList(
new DefaultPortDescription(P1, true),
new DefaultPortDescription(P2, false)
);
@@ -771,7 +771,7 @@
@Test
public final void testRemoveDevice() {
putDevice(DID1, SW1, A1);
- List<PortDescription> pds = Arrays.<PortDescription>asList(
+ List<PortDescription> pds = Arrays.asList(
new DefaultPortDescription(P1, true, A2)
);
deviceStore.updatePorts(PID, DID1, pds);
@@ -800,7 +800,7 @@
// putBack Device, Port w/o annotation
putDevice(DID1, SW1);
- List<PortDescription> pds2 = Arrays.<PortDescription>asList(
+ List<PortDescription> pds2 = Arrays.asList(
new DefaultPortDescription(P1, true)
);
deviceStore.updatePorts(PID, DID1, pds2);