X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=controller.git;a=blobdiff_plain;f=opendaylight%2Fcommons%2Fliblldp%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fliblldp%2FEthernet.java;h=c2d9e7003e2908f23874e1495149bd14ffead437;hp=54452bb9a4f2d4411070620611be93578910d39a;hb=d6a49e6efc758716d8f22e5b88509c21468c174a;hpb=26d0e25159bf3b73ca38a88e17268cf17f876d8d diff --git a/opendaylight/commons/liblldp/src/main/java/org/opendaylight/controller/liblldp/Ethernet.java b/opendaylight/commons/liblldp/src/main/java/org/opendaylight/controller/liblldp/Ethernet.java index 54452bb9a4..c2d9e7003e 100644 --- a/opendaylight/commons/liblldp/src/main/java/org/opendaylight/controller/liblldp/Ethernet.java +++ b/opendaylight/commons/liblldp/src/main/java/org/opendaylight/controller/liblldp/Ethernet.java @@ -1,4 +1,3 @@ - /* * Copyright (c) 2013 Cisco Systems, Inc. and others. All rights reserved. * @@ -28,15 +27,15 @@ public class Ethernet extends Packet { // to add new coming packet classes public static final Map> etherTypeClassMap; static { - etherTypeClassMap = new HashMap>(); + etherTypeClassMap = new HashMap<>(); etherTypeClassMap.put(EtherTypes.LLDP.shortValue(), LLDP.class); } private static Map> fieldCoordinates = new LinkedHashMap>() { private static final long serialVersionUID = 1L; { - put(DMAC, new ImmutablePair(0, 48)); - put(SMAC, new ImmutablePair(48, 48)); - put(ETHT, new ImmutablePair(96, 16)); + put(DMAC, new ImmutablePair<>(0, 48)); + put(SMAC, new ImmutablePair<>(48, 48)); + put(ETHT, new ImmutablePair<>(96, 16)); } }; private final Map fieldValues; @@ -46,7 +45,7 @@ public class Ethernet extends Packet { */ public Ethernet() { super(); - fieldValues = new HashMap(); + fieldValues = new HashMap<>(); hdrFieldCoordMap = fieldCoordinates; hdrFieldsMap = fieldValues; } @@ -57,7 +56,7 @@ public class Ethernet extends Packet { */ public Ethernet(boolean writeAccess) { super(writeAccess); - fieldValues = new HashMap(); + fieldValues = new HashMap<>(); hdrFieldCoordMap = fieldCoordinates; hdrFieldsMap = fieldValues; }