Use dianmond operator
Change-Id: I551dd9443b10ef17832f74a554486b7605e9866a
diff --git a/apps/vtnweb/src/main/java/org/onosproject/vtnweb/resources/VirtualPortWebResource.java b/apps/vtnweb/src/main/java/org/onosproject/vtnweb/resources/VirtualPortWebResource.java
index 0a427bb..1cb1444 100644
--- a/apps/vtnweb/src/main/java/org/onosproject/vtnweb/resources/VirtualPortWebResource.java
+++ b/apps/vtnweb/src/main/java/org/onosproject/vtnweb/resources/VirtualPortWebResource.java
@@ -131,7 +131,7 @@
@Path("{portUUID}")
@DELETE
public Response deletePorts(@PathParam("portUUID") String id) {
- Set<VirtualPortId> vPortIds = new HashSet<VirtualPortId>();
+ Set<VirtualPortId> vPortIds = new HashSet<>();
try {
if (id != null) {
vPortIds.add(VirtualPortId.portId(id));
@@ -201,8 +201,8 @@
*/
public Iterable<VirtualPort> changeJsonToPorts(JsonNode vPortNodes) {
checkNotNull(vPortNodes, JSON_NOT_NULL);
- Map<VirtualPortId, VirtualPort> portMap = new HashMap<VirtualPortId, VirtualPort>();
- Map<String, String> strMap = new HashMap<String, String>();
+ Map<VirtualPortId, VirtualPort> portMap = new HashMap<>();
+ Map<String, String> strMap = new HashMap<>();
for (JsonNode vPortnode : vPortNodes) {
VirtualPortId id = VirtualPortId.portId(vPortnode.get("id")
.asText());
@@ -220,7 +220,7 @@
.asText());
String deviceOwner = vPortnode.get("device_owner").asText();
JsonNode fixedIpNodes = vPortNodes.get("fixed_ips");
- Set<FixedIp> fixedIps = new HashSet<FixedIp>();
+ Set<FixedIp> fixedIps = new HashSet<>();
for (JsonNode fixedIpNode : fixedIpNodes) {
FixedIp fixedIp = jsonNodeToFixedIps(fixedIpNode);
fixedIps.add(fixedIp);
@@ -265,8 +265,8 @@
*/
public Iterable<VirtualPort> changeJsonToPort(JsonNode vPortNodes) {
checkNotNull(vPortNodes, JSON_NOT_NULL);
- Map<VirtualPortId, VirtualPort> vportMap = new HashMap<VirtualPortId, VirtualPort>();
- Map<String, String> strMap = new HashMap<String, String>();
+ Map<VirtualPortId, VirtualPort> vportMap = new HashMap<>();
+ Map<String, String> strMap = new HashMap<>();
VirtualPortId id = VirtualPortId.portId(vPortNodes.get("id").asText());
String name = vPortNodes.get("name").asText();
TenantId tenantId = TenantId.tenantId(vPortNodes.get("tenant_id")
@@ -281,7 +281,7 @@
.asText());
String deviceOwner = vPortNodes.get("device_owner").asText();
JsonNode fixedIpNodes = vPortNodes.get("fixed_ips");
- Set<FixedIp> fixedIps = new HashSet<FixedIp>();
+ Set<FixedIp> fixedIps = new HashSet<>();
for (JsonNode fixedIpNode : fixedIpNodes) {
FixedIp fixedIp = jsonNodeToFixedIps(fixedIpNode);
fixedIps.add(fixedIp);