Use diamond operator
Change-Id: Ic7637e41b9e6a4ac04cd81caf07cea0e7a30909c
diff --git a/pcep/ctl/src/main/java/org/onosproject/pcep/controller/impl/PcepChannelHandler.java b/pcep/ctl/src/main/java/org/onosproject/pcep/controller/impl/PcepChannelHandler.java
index 01e8431..30c940d 100644
--- a/pcep/ctl/src/main/java/org/onosproject/pcep/controller/impl/PcepChannelHandler.java
+++ b/pcep/ctl/src/main/java/org/onosproject/pcep/controller/impl/PcepChannelHandler.java
@@ -569,7 +569,7 @@
* @throws PcepParseException while bulding error message
*/
public PcepErrorMsg getErrorMsg(byte errorType, byte errorValue) throws PcepParseException {
- LinkedList<PcepErrorObject> llerrObj = new LinkedList<PcepErrorObject>();
+ LinkedList<PcepErrorObject> llerrObj = new LinkedList<>();
PcepErrorMsg errMsg;
PcepErrorObject errObj = factory1.buildPcepErrorObject()
@@ -597,7 +597,7 @@
} else {
//If Error caught in other than Openmessage
- LinkedList<PcepError> llPcepErr = new LinkedList<PcepError>();
+ LinkedList<PcepError> llPcepErr = new LinkedList<>();
PcepError pcepErr = factory1.buildPcepError()
.setErrorObjList(llerrObj)
diff --git a/pcep/ctl/src/main/java/org/onosproject/pcep/controller/impl/PcepClientControllerImpl.java b/pcep/ctl/src/main/java/org/onosproject/pcep/controller/impl/PcepClientControllerImpl.java
index a4ec0ff..00c8c69 100644
--- a/pcep/ctl/src/main/java/org/onosproject/pcep/controller/impl/PcepClientControllerImpl.java
+++ b/pcep/ctl/src/main/java/org/onosproject/pcep/controller/impl/PcepClientControllerImpl.java
@@ -47,7 +47,7 @@
private static final Logger log = LoggerFactory.getLogger(PcepClientControllerImpl.class);
protected ConcurrentHashMap<PccId, PcepClient> connectedClients =
- new ConcurrentHashMap<PccId, PcepClient>();
+ new ConcurrentHashMap<>();
protected PcepClientAgent agent = new PcepClientAgent();
protected Set<PcepClientListener> pcepClientListener = new HashSet<>();
diff --git a/pcep/ctl/src/main/java/org/onosproject/pcep/controller/impl/PcepMessageDecoder.java b/pcep/ctl/src/main/java/org/onosproject/pcep/controller/impl/PcepMessageDecoder.java
index e918725..b106589 100644
--- a/pcep/ctl/src/main/java/org/onosproject/pcep/controller/impl/PcepMessageDecoder.java
+++ b/pcep/ctl/src/main/java/org/onosproject/pcep/controller/impl/PcepMessageDecoder.java
@@ -57,7 +57,7 @@
// a list of the parsed messages to the controller.
// The performance *may or may not* not be as good as before.
PcepMessageReader<PcepMessage> reader = PcepFactories.getGenericReader();
- List<PcepMessage> msgList = new LinkedList<PcepMessage>();
+ List<PcepMessage> msgList = new LinkedList<>();
while (buffer.readableBytes() > 0) {
PcepMessage message = reader.readFrom(buffer);
diff --git a/pcep/pcepio/src/main/java/org/onosproject/pcepio/protocol/ver1/PcepAttributeVer1.java b/pcep/pcepio/src/main/java/org/onosproject/pcepio/protocol/ver1/PcepAttributeVer1.java
index a73c45d..65a844c 100644
--- a/pcep/pcepio/src/main/java/org/onosproject/pcepio/protocol/ver1/PcepAttributeVer1.java
+++ b/pcep/pcepio/src/main/java/org/onosproject/pcepio/protocol/ver1/PcepAttributeVer1.java
@@ -144,7 +144,7 @@
public boolean parseMetricList(ChannelBuffer cb) throws PcepParseException {
if (llMetricList == null) {
- llMetricList = new LinkedList<PcepMetricObject>();
+ llMetricList = new LinkedList<>();
}
PcepMetricObject metriclist;
diff --git a/pcep/pcepio/src/main/java/org/onosproject/pcepio/protocol/ver1/PcepCloseMsgVer1.java b/pcep/pcepio/src/main/java/org/onosproject/pcepio/protocol/ver1/PcepCloseMsgVer1.java
index cb15ab6..bcc679d 100644
--- a/pcep/pcepio/src/main/java/org/onosproject/pcepio/protocol/ver1/PcepCloseMsgVer1.java
+++ b/pcep/pcepio/src/main/java/org/onosproject/pcepio/protocol/ver1/PcepCloseMsgVer1.java
@@ -131,7 +131,7 @@
*/
public static LinkedList<PcepValueType> parseOptionalTlv(ChannelBuffer cb) throws PcepParseException {
- LinkedList<PcepValueType> llOptionalTlv = new LinkedList<PcepValueType>();
+ LinkedList<PcepValueType> llOptionalTlv = new LinkedList<>();
/*
rfc 5440:
Optional TLVs may be included within the CLOSE object body. The
@@ -164,7 +164,7 @@
private PcepObjectHeader closeObjHeader;
private boolean bIsReasonSet = false;
private byte yReason;
- private LinkedList<PcepValueType> llOptionalTlv = new LinkedList<PcepValueType>();
+ private LinkedList<PcepValueType> llOptionalTlv = new LinkedList<>();
private boolean bIsPFlagSet = false;
private boolean bPFlag;
diff --git a/pcep/pcepio/src/main/java/org/onosproject/pcepio/protocol/ver1/PcepEroObjectVer1.java b/pcep/pcepio/src/main/java/org/onosproject/pcepio/protocol/ver1/PcepEroObjectVer1.java
index 54adf64..4d7cb16 100644
--- a/pcep/pcepio/src/main/java/org/onosproject/pcepio/protocol/ver1/PcepEroObjectVer1.java
+++ b/pcep/pcepio/src/main/java/org/onosproject/pcepio/protocol/ver1/PcepEroObjectVer1.java
@@ -153,7 +153,7 @@
PcepObjectHeader.REQ_OBJ_OPTIONAL_PROCESS, PcepObjectHeader.RSP_OBJ_PROCESSED, ERO_OBJ_MINIMUM_LENGTH);
private PcepObjectHeader eroObjHeader;
- private LinkedList<PcepValueType> llSubObjects = new LinkedList<PcepValueType>();
+ private LinkedList<PcepValueType> llSubObjects = new LinkedList<>();
/**
* reset variables.
@@ -213,7 +213,7 @@
public static PcepEroObject read(ChannelBuffer cb) throws PcepParseException {
PcepObjectHeader eroObjHeader;
- LinkedList<PcepValueType> llSubObjects = new LinkedList<PcepValueType>();
+ LinkedList<PcepValueType> llSubObjects = new LinkedList<>();
eroObjHeader = PcepObjectHeader.read(cb);
@@ -239,7 +239,7 @@
*/
protected static LinkedList<PcepValueType> parseSubObjects(ChannelBuffer cb) throws PcepParseException {
- LinkedList<PcepValueType> llSubObjects = new LinkedList<PcepValueType>();
+ LinkedList<PcepValueType> llSubObjects = new LinkedList<>();
while (0 < cb.readableBytes()) {
@@ -342,7 +342,7 @@
private boolean bIFlag;
private PcepObjectHeader eroObjHeader;
- LinkedList<PcepValueType> llSubObjects = new LinkedList<PcepValueType>();
+ LinkedList<PcepValueType> llSubObjects = new LinkedList<>();
@Override
public PcepEroObject build() {
diff --git a/pcep/pcepio/src/main/java/org/onosproject/pcepio/protocol/ver1/PcepErrorInfoVer1.java b/pcep/pcepio/src/main/java/org/onosproject/pcepio/protocol/ver1/PcepErrorInfoVer1.java
index 7b068f2..9c77e17 100644
--- a/pcep/pcepio/src/main/java/org/onosproject/pcepio/protocol/ver1/PcepErrorInfoVer1.java
+++ b/pcep/pcepio/src/main/java/org/onosproject/pcepio/protocol/ver1/PcepErrorInfoVer1.java
@@ -50,7 +50,7 @@
*/
public PcepErrorInfoVer1(LinkedList<PcepRPObject> llRPObjList, LinkedList<PcepTEObject> llTEObjList,
LinkedList<PcepErrorObject> llErrObjList) {
- this.errList = new LinkedList<PcepError>();
+ this.errList = new LinkedList<>();
if ((llErrObjList != null) && (!llErrObjList.isEmpty())) {
this.errList.add(new PcepErrorVer1(llRPObjList, llTEObjList, llErrObjList));
}
@@ -133,7 +133,7 @@
@Override
public LinkedList<Integer> getErrorType() {
- LinkedList<Integer> errorType = new LinkedList<Integer>();
+ LinkedList<Integer> errorType = new LinkedList<>();
ListIterator<PcepError> listIterator = errList.listIterator();
PcepErrorObject errObj;
int error;
@@ -154,7 +154,7 @@
@Override
public LinkedList<Integer> getErrorValue() {
- LinkedList<Integer> errorValue = new LinkedList<Integer>();
+ LinkedList<Integer> errorValue = new LinkedList<>();
ListIterator<PcepError> listIterator = errList.listIterator();
PcepErrorObject errObj;
int error;
diff --git a/pcep/pcepio/src/main/java/org/onosproject/pcepio/protocol/ver1/PcepErrorMsgVer1.java b/pcep/pcepio/src/main/java/org/onosproject/pcepio/protocol/ver1/PcepErrorMsgVer1.java
index 3651bcb..e8801c2 100644
--- a/pcep/pcepio/src/main/java/org/onosproject/pcepio/protocol/ver1/PcepErrorMsgVer1.java
+++ b/pcep/pcepio/src/main/java/org/onosproject/pcepio/protocol/ver1/PcepErrorMsgVer1.java
@@ -142,7 +142,7 @@
}
//parse PCEP-ERROR list
- llErrObjList = new LinkedList<PcepErrorObject>();
+ llErrObjList = new LinkedList<>();
tempObjHeader = parseErrorObjectList(llErrObjList, cb);
//check whether OPEN-OBJECT is present.
@@ -323,7 +323,7 @@
* @return error types list
*/
public LinkedList<Integer> getErrorType() {
- LinkedList<Integer> llErrorType = new LinkedList<Integer>();
+ LinkedList<Integer> llErrorType = new LinkedList<>();
if ((errObjListWithOpen != null)
&& (errObjListWithOpen.isErrorObjListWithOpenPresent())) {
llErrorType = errObjListWithOpen.getErrorType();
@@ -340,7 +340,7 @@
* @return error value list
*/
public LinkedList<Integer> getErrorValue() {
- LinkedList<Integer> llErrorValue = new LinkedList<Integer>();
+ LinkedList<Integer> llErrorValue = new LinkedList<>();
if ((errObjListWithOpen != null)
&& (errObjListWithOpen.isErrorObjListWithOpenPresent())) {
llErrorValue = errObjListWithOpen.getErrorValue();
diff --git a/pcep/pcepio/src/main/java/org/onosproject/pcepio/protocol/ver1/PcepErrorObjectVer1.java b/pcep/pcepio/src/main/java/org/onosproject/pcepio/protocol/ver1/PcepErrorObjectVer1.java
index fb09df5..dc8c828 100644
--- a/pcep/pcepio/src/main/java/org/onosproject/pcepio/protocol/ver1/PcepErrorObjectVer1.java
+++ b/pcep/pcepio/src/main/java/org/onosproject/pcepio/protocol/ver1/PcepErrorObjectVer1.java
@@ -149,7 +149,7 @@
*/
protected static LinkedList<PcepValueType> parseOptionalTlv(ChannelBuffer cb) {
- LinkedList<PcepValueType> llOutOptionalTlv = new LinkedList<PcepValueType>();
+ LinkedList<PcepValueType> llOutOptionalTlv = new LinkedList<>();
byte[] yTemp = new byte[cb.readableBytes()];
cb.readBytes(yTemp);
@@ -239,7 +239,7 @@
private boolean bIsIFlagSet = false;
private boolean bIFlag;
- private LinkedList<PcepValueType> llOptionalTlv = new LinkedList<PcepValueType>();
+ private LinkedList<PcepValueType> llOptionalTlv = new LinkedList<>();
@Override
public PcepErrorObject build() {
diff --git a/pcep/pcepio/src/main/java/org/onosproject/pcepio/protocol/ver1/PcepErrorVer1.java b/pcep/pcepio/src/main/java/org/onosproject/pcepio/protocol/ver1/PcepErrorVer1.java
index 5c499fc..847211e 100644
--- a/pcep/pcepio/src/main/java/org/onosproject/pcepio/protocol/ver1/PcepErrorVer1.java
+++ b/pcep/pcepio/src/main/java/org/onosproject/pcepio/protocol/ver1/PcepErrorVer1.java
@@ -117,7 +117,7 @@
byte yObjClass;
byte yObjType;
- llRPObjList = new LinkedList<PcepRPObject>();
+ llRPObjList = new LinkedList<>();
// caller should verify for RP object
if (cb.readableBytes() < OBJECT_HEADER_LENGTH) {
@@ -157,7 +157,7 @@
byte yObjClass;
byte yObjType;
- llTEObjList = new LinkedList<PcepTEObject>();
+ llTEObjList = new LinkedList<>();
// caller should verify for TE object
if (cb.readableBytes() < OBJECT_HEADER_LENGTH) {
@@ -199,7 +199,7 @@
byte yObjType;
boolean bIsErrorObjFound = false;
- llErrObjList = new LinkedList<PcepErrorObject>();
+ llErrObjList = new LinkedList<>();
// caller should verify for RP object
if (cb.readableBytes() < OBJECT_HEADER_LENGTH) {
diff --git a/pcep/pcepio/src/main/java/org/onosproject/pcepio/protocol/ver1/PcepInitiateMsgVer1.java b/pcep/pcepio/src/main/java/org/onosproject/pcepio/protocol/ver1/PcepInitiateMsgVer1.java
index fc9f536..60d14b0 100644
--- a/pcep/pcepio/src/main/java/org/onosproject/pcepio/protocol/ver1/PcepInitiateMsgVer1.java
+++ b/pcep/pcepio/src/main/java/org/onosproject/pcepio/protocol/ver1/PcepInitiateMsgVer1.java
@@ -87,7 +87,7 @@
return null;
}
- llPcInitiatedLspRequestList = new LinkedList<PcInitiatedLspRequest>();
+ llPcInitiatedLspRequestList = new LinkedList<>();
byte version = cb.readByte();
version = (byte) (version >> PcepMessageVer1.SHIFT_FLAG);
diff --git a/pcep/pcepio/src/main/java/org/onosproject/pcepio/protocol/ver1/PcepIroObjectVer1.java b/pcep/pcepio/src/main/java/org/onosproject/pcepio/protocol/ver1/PcepIroObjectVer1.java
index d2e9136..2e01bda 100644
--- a/pcep/pcepio/src/main/java/org/onosproject/pcepio/protocol/ver1/PcepIroObjectVer1.java
+++ b/pcep/pcepio/src/main/java/org/onosproject/pcepio/protocol/ver1/PcepIroObjectVer1.java
@@ -73,7 +73,7 @@
private byte yPrefixLength;
private byte yResvd;
private PcepObjectHeader iroObjHeader;
- private LinkedList<PcepValueType> llSubObjects = new LinkedList<PcepValueType>();
+ private LinkedList<PcepValueType> llSubObjects = new LinkedList<>();
/**
* Default constructor.
@@ -152,7 +152,7 @@
*/
protected static LinkedList<PcepValueType> parseSubObjects(ChannelBuffer cb) throws PcepParseException {
- LinkedList<PcepValueType> llSubObjects = new LinkedList<PcepValueType>();
+ LinkedList<PcepValueType> llSubObjects = new LinkedList<>();
while (0 < cb.readableBytes()) {
@@ -228,7 +228,7 @@
private boolean bIsHeaderSet = false;
private PcepObjectHeader iroObjHeader;
- LinkedList<PcepValueType> llSubObjects = new LinkedList<PcepValueType>();
+ LinkedList<PcepValueType> llSubObjects = new LinkedList<>();
private boolean bIsPFlagSet = false;
private boolean bPFlag;
diff --git a/pcep/pcepio/src/main/java/org/onosproject/pcepio/protocol/ver1/PcepLabelObjectVer1.java b/pcep/pcepio/src/main/java/org/onosproject/pcepio/protocol/ver1/PcepLabelObjectVer1.java
index b8d33e8..97a1b99 100644
--- a/pcep/pcepio/src/main/java/org/onosproject/pcepio/protocol/ver1/PcepLabelObjectVer1.java
+++ b/pcep/pcepio/src/main/java/org/onosproject/pcepio/protocol/ver1/PcepLabelObjectVer1.java
@@ -138,7 +138,7 @@
int label;
// Optional TLV
- LinkedList<PcepValueType> llOptionalTlv = new LinkedList<PcepValueType>();
+ LinkedList<PcepValueType> llOptionalTlv = new LinkedList<>();
labelObjHeader = PcepObjectHeader.read(cb);
//take only LspObject buffer.
@@ -191,7 +191,7 @@
*/
protected static LinkedList<PcepValueType> parseOptionalTlv(ChannelBuffer cb) throws PcepParseException {
- LinkedList<PcepValueType> llOutOptionalTlv = new LinkedList<PcepValueType>();
+ LinkedList<PcepValueType> llOutOptionalTlv = new LinkedList<>();
while (MINIMUM_COMMON_HEADER_LENGTH <= cb.readableBytes()) {
@@ -272,7 +272,7 @@
private boolean bOFlag;
private int label;
- LinkedList<PcepValueType> llOptionalTlv = new LinkedList<PcepValueType>();
+ LinkedList<PcepValueType> llOptionalTlv = new LinkedList<>();
private boolean bIsPFlagSet = false;
private boolean bPFlag;
diff --git a/pcep/pcepio/src/main/java/org/onosproject/pcepio/protocol/ver1/PcepLabelRangeObjectVer1.java b/pcep/pcepio/src/main/java/org/onosproject/pcepio/protocol/ver1/PcepLabelRangeObjectVer1.java
index e49e792..9e4be91 100644
--- a/pcep/pcepio/src/main/java/org/onosproject/pcepio/protocol/ver1/PcepLabelRangeObjectVer1.java
+++ b/pcep/pcepio/src/main/java/org/onosproject/pcepio/protocol/ver1/PcepLabelRangeObjectVer1.java
@@ -142,7 +142,7 @@
int rangeSize;
int labelBase;
- LinkedList<PcepValueType> llOptionalTlv = new LinkedList<PcepValueType>();
+ LinkedList<PcepValueType> llOptionalTlv = new LinkedList<>();
labelRangeObjHeader = PcepObjectHeader.read(cb);
@@ -189,7 +189,7 @@
*/
public static LinkedList<PcepValueType> parseOptionalTlv(ChannelBuffer cb) throws PcepParseException {
- LinkedList<PcepValueType> llOutOptionalTlv = new LinkedList<PcepValueType>();
+ LinkedList<PcepValueType> llOutOptionalTlv = new LinkedList<>();
while (MINIMUM_COMMON_HEADER_LENGTH <= cb.readableBytes()) {
@@ -272,7 +272,7 @@
private boolean bIFlag;
private PcepObjectHeader labelRangeObjHeader;
- LinkedList<PcepValueType> llOptionalTlv = new LinkedList<PcepValueType>();
+ LinkedList<PcepValueType> llOptionalTlv = new LinkedList<>();
@Override
public PcepLabelRangeObject build() throws PcepParseException {
diff --git a/pcep/pcepio/src/main/java/org/onosproject/pcepio/protocol/ver1/PcepLabelRangeVer1.java b/pcep/pcepio/src/main/java/org/onosproject/pcepio/protocol/ver1/PcepLabelRangeVer1.java
index 09dccca..411c960 100644
--- a/pcep/pcepio/src/main/java/org/onosproject/pcepio/protocol/ver1/PcepLabelRangeVer1.java
+++ b/pcep/pcepio/src/main/java/org/onosproject/pcepio/protocol/ver1/PcepLabelRangeVer1.java
@@ -104,7 +104,7 @@
throw new PcepParseException("Exception while parsing srp object");
}
- LinkedList<PcepLabelRangeObject> llLabelRangeList = new LinkedList<PcepLabelRangeObject>();
+ LinkedList<PcepLabelRangeObject> llLabelRangeList = new LinkedList<>();
boolean bFoundLabelRangeObj = false;
while (0 < cb.readableBytes()) {
//parse and store <labelrange-list>
diff --git a/pcep/pcepio/src/main/java/org/onosproject/pcepio/protocol/ver1/PcepLabelUpdateMsgVer1.java b/pcep/pcepio/src/main/java/org/onosproject/pcepio/protocol/ver1/PcepLabelUpdateMsgVer1.java
index e27a464..89347f4 100644
--- a/pcep/pcepio/src/main/java/org/onosproject/pcepio/protocol/ver1/PcepLabelUpdateMsgVer1.java
+++ b/pcep/pcepio/src/main/java/org/onosproject/pcepio/protocol/ver1/PcepLabelUpdateMsgVer1.java
@@ -118,7 +118,7 @@
public LinkedList<PcepLabelUpdate> parsePcLabelUpdateList(ChannelBuffer cb) throws PcepParseException {
LinkedList<PcepLabelUpdate> llPcLabelUpdateList;
- llPcLabelUpdateList = new LinkedList<PcepLabelUpdate>();
+ llPcLabelUpdateList = new LinkedList<>();
while (0 < cb.readableBytes()) {
llPcLabelUpdateList.add(PcepLabelUpdateVer1.read(cb));
diff --git a/pcep/pcepio/src/main/java/org/onosproject/pcepio/protocol/ver1/PcepLabelUpdateVer1.java b/pcep/pcepio/src/main/java/org/onosproject/pcepio/protocol/ver1/PcepLabelUpdateVer1.java
index 22fae2b..a2293d3 100644
--- a/pcep/pcepio/src/main/java/org/onosproject/pcepio/protocol/ver1/PcepLabelUpdateVer1.java
+++ b/pcep/pcepio/src/main/java/org/onosproject/pcepio/protocol/ver1/PcepLabelUpdateVer1.java
@@ -185,7 +185,7 @@
labelDownload.setLspObject(PcepLspObjectVer1.read(cb));
//<label-list>
- LinkedList<PcepLabelObject> llLabelList = new LinkedList<PcepLabelObject>();
+ LinkedList<PcepLabelObject> llLabelList = new LinkedList<>();
PcepLabelObject labelObject;
while (0 < cb.readableBytes()) {
diff --git a/pcep/pcepio/src/main/java/org/onosproject/pcepio/protocol/ver1/PcepLspObjectVer1.java b/pcep/pcepio/src/main/java/org/onosproject/pcepio/protocol/ver1/PcepLspObjectVer1.java
index 89d17e1..6023ef3 100644
--- a/pcep/pcepio/src/main/java/org/onosproject/pcepio/protocol/ver1/PcepLspObjectVer1.java
+++ b/pcep/pcepio/src/main/java/org/onosproject/pcepio/protocol/ver1/PcepLspObjectVer1.java
@@ -234,7 +234,7 @@
boolean bDFlag;
// Optional TLV
- LinkedList<PcepValueType> llOptionalTlv = new LinkedList<PcepValueType>();
+ LinkedList<PcepValueType> llOptionalTlv = new LinkedList<>();
lspObjHeader = PcepObjectHeader.read(cb);
@@ -314,7 +314,7 @@
LinkedList<PcepValueType> llOutOptionalTlv;
- llOutOptionalTlv = new LinkedList<PcepValueType>();
+ llOutOptionalTlv = new LinkedList<>();
while (MINIMUM_COMMON_HEADER_LENGTH <= cb.readableBytes()) {
diff --git a/pcep/pcepio/src/main/java/org/onosproject/pcepio/protocol/ver1/PcepLspaObjectVer1.java b/pcep/pcepio/src/main/java/org/onosproject/pcepio/protocol/ver1/PcepLspaObjectVer1.java
index 5094157..be51d38 100644
--- a/pcep/pcepio/src/main/java/org/onosproject/pcepio/protocol/ver1/PcepLspaObjectVer1.java
+++ b/pcep/pcepio/src/main/java/org/onosproject/pcepio/protocol/ver1/PcepLspaObjectVer1.java
@@ -290,7 +290,7 @@
*/
public static LinkedList<PcepValueType> parseOptionalTlv(ChannelBuffer cb) throws PcepParseException {
- LinkedList<PcepValueType> llOutOptionalTlv = new LinkedList<PcepValueType>();
+ LinkedList<PcepValueType> llOutOptionalTlv = new LinkedList<>();
return llOutOptionalTlv;
}
diff --git a/pcep/pcepio/src/main/java/org/onosproject/pcepio/protocol/ver1/PcepOpenObjectVer1.java b/pcep/pcepio/src/main/java/org/onosproject/pcepio/protocol/ver1/PcepOpenObjectVer1.java
index 6dfb207..d5e5869 100644
--- a/pcep/pcepio/src/main/java/org/onosproject/pcepio/protocol/ver1/PcepOpenObjectVer1.java
+++ b/pcep/pcepio/src/main/java/org/onosproject/pcepio/protocol/ver1/PcepOpenObjectVer1.java
@@ -213,7 +213,7 @@
LinkedList<PcepValueType> llOptionalTlv;
- llOptionalTlv = new LinkedList<PcepValueType>();
+ llOptionalTlv = new LinkedList<>();
while (4 <= cb.readableBytes()) {
PcepValueType tlv;
@@ -360,7 +360,7 @@
private boolean bIsSessionIDSet = false;
private byte sessionID;
private boolean bIsOptionalTlvSet = false;
- private LinkedList<PcepValueType> llOptionalTlv = new LinkedList<PcepValueType>();
+ private LinkedList<PcepValueType> llOptionalTlv = new LinkedList<>();
private boolean bIsPFlagSet = false;
private boolean bPFlag;
diff --git a/pcep/pcepio/src/main/java/org/onosproject/pcepio/protocol/ver1/PcepRPObjectVer1.java b/pcep/pcepio/src/main/java/org/onosproject/pcepio/protocol/ver1/PcepRPObjectVer1.java
index 05b4b8a..e221c2f 100644
--- a/pcep/pcepio/src/main/java/org/onosproject/pcepio/protocol/ver1/PcepRPObjectVer1.java
+++ b/pcep/pcepio/src/main/java/org/onosproject/pcepio/protocol/ver1/PcepRPObjectVer1.java
@@ -189,7 +189,7 @@
boolean bBFlag;
boolean bRFlag;
byte yPriFlag; // 3bytes
- LinkedList<PcepValueType> llOptionalTlv = new LinkedList<PcepValueType>();
+ LinkedList<PcepValueType> llOptionalTlv = new LinkedList<>();
rpObjHeader = PcepObjectHeader.read(cb);
@@ -253,7 +253,7 @@
*/
protected static LinkedList<PcepValueType> parseOptionalTlv(ChannelBuffer cb) throws PcepParseException {
- LinkedList<PcepValueType> llOutOptionalTlv = new LinkedList<PcepValueType>();
+ LinkedList<PcepValueType> llOutOptionalTlv = new LinkedList<>();
//Currently no optional TLvs, will be added based on requirements.
return llOutOptionalTlv;
}
@@ -292,7 +292,7 @@
private boolean bBFlag;
private boolean bRFlag;
private byte yPriFlag;
- private LinkedList<PcepValueType> llOptionalTlv = new LinkedList<PcepValueType>();
+ private LinkedList<PcepValueType> llOptionalTlv = new LinkedList<>();
private boolean bIsPFlagSet = false;
private boolean bPFlag;
diff --git a/pcep/pcepio/src/main/java/org/onosproject/pcepio/protocol/ver1/PcepReportMsgVer1.java b/pcep/pcepio/src/main/java/org/onosproject/pcepio/protocol/ver1/PcepReportMsgVer1.java
index 2029650..26e48db 100644
--- a/pcep/pcepio/src/main/java/org/onosproject/pcepio/protocol/ver1/PcepReportMsgVer1.java
+++ b/pcep/pcepio/src/main/java/org/onosproject/pcepio/protocol/ver1/PcepReportMsgVer1.java
@@ -88,7 +88,7 @@
throw new PcepParseException("Received packet size " + cb.readableBytes()
+ " is less than the expected size: " + PACKET_MINIMUM_LENGTH);
}
- llStateReportList = new LinkedList<PcepStateReport>();
+ llStateReportList = new LinkedList<>();
byte version = cb.readByte();
version = (byte) (version >> PcepMessageVer1.SHIFT_FLAG);
diff --git a/pcep/pcepio/src/main/java/org/onosproject/pcepio/protocol/ver1/PcepRroObjectVer1.java b/pcep/pcepio/src/main/java/org/onosproject/pcepio/protocol/ver1/PcepRroObjectVer1.java
index f510e39..4df42e0 100644
--- a/pcep/pcepio/src/main/java/org/onosproject/pcepio/protocol/ver1/PcepRroObjectVer1.java
+++ b/pcep/pcepio/src/main/java/org/onosproject/pcepio/protocol/ver1/PcepRroObjectVer1.java
@@ -111,7 +111,7 @@
private byte prefixLength;
private byte resvd;
PcepObjectHeader rroObjHeader;
- private LinkedList<PcepValueType> llSubObjects = new LinkedList<PcepValueType>();
+ private LinkedList<PcepValueType> llSubObjects = new LinkedList<>();
/**
* Reset variables.
@@ -190,7 +190,7 @@
*/
protected static LinkedList<PcepValueType> parseSubObjects(ChannelBuffer cb) throws PcepParseException {
- LinkedList<PcepValueType> llSubObjects = new LinkedList<PcepValueType>();
+ LinkedList<PcepValueType> llSubObjects = new LinkedList<>();
while (0 < cb.readableBytes()) {
@@ -275,7 +275,7 @@
private boolean bIsHeaderSet = false;
private PcepObjectHeader rroObjHeader;
- LinkedList<PcepValueType> llSubObjects = new LinkedList<PcepValueType>();
+ LinkedList<PcepValueType> llSubObjects = new LinkedList<>();
private boolean bIsPFlagSet = false;
private boolean bPFlag;
diff --git a/pcep/pcepio/src/main/java/org/onosproject/pcepio/protocol/ver1/PcepSrpObjectVer1.java b/pcep/pcepio/src/main/java/org/onosproject/pcepio/protocol/ver1/PcepSrpObjectVer1.java
index 41c2f09..0efdb58 100644
--- a/pcep/pcepio/src/main/java/org/onosproject/pcepio/protocol/ver1/PcepSrpObjectVer1.java
+++ b/pcep/pcepio/src/main/java/org/onosproject/pcepio/protocol/ver1/PcepSrpObjectVer1.java
@@ -155,7 +155,7 @@
int srpID;
int flags;
- LinkedList<PcepValueType> llOptionalTlv = new LinkedList<PcepValueType>();
+ LinkedList<PcepValueType> llOptionalTlv = new LinkedList<>();
srpObjHeader = PcepObjectHeader.read(cb);
@@ -212,7 +212,7 @@
*/
public static LinkedList<PcepValueType> parseOptionalTlv(ChannelBuffer cb) throws PcepParseException {
- LinkedList<PcepValueType> llOutOptionalTlv = new LinkedList<PcepValueType>();
+ LinkedList<PcepValueType> llOutOptionalTlv = new LinkedList<>();
while (MINIMUM_COMMON_HEADER_LENGTH <= cb.readableBytes()) {
@@ -289,7 +289,7 @@
private PcepObjectHeader srpObjHeader;
private int srpId;
private boolean bRFlag;
- LinkedList<PcepValueType> llOptionalTlv = new LinkedList<PcepValueType>();
+ LinkedList<PcepValueType> llOptionalTlv = new LinkedList<>();
private boolean bIsPFlagSet = false;
private boolean bPFlag;
diff --git a/pcep/pcepio/src/main/java/org/onosproject/pcepio/protocol/ver1/PcepTEObjectVer1.java b/pcep/pcepio/src/main/java/org/onosproject/pcepio/protocol/ver1/PcepTEObjectVer1.java
index 348972a..5e7a0cd 100644
--- a/pcep/pcepio/src/main/java/org/onosproject/pcepio/protocol/ver1/PcepTEObjectVer1.java
+++ b/pcep/pcepio/src/main/java/org/onosproject/pcepio/protocol/ver1/PcepTEObjectVer1.java
@@ -277,7 +277,7 @@
LinkedList<PcepValueType> llOutOptionalTlv;
- llOutOptionalTlv = new LinkedList<PcepValueType>();
+ llOutOptionalTlv = new LinkedList<>();
while (MINIMUM_TLV_HEADER_LENGTH <= cb.readableBytes()) {
@@ -377,7 +377,7 @@
private boolean bRFlag;
private boolean bSFlag;
private int iTEId;
- private LinkedList<PcepValueType> llOptionalTlv = new LinkedList<PcepValueType>();
+ private LinkedList<PcepValueType> llOptionalTlv = new LinkedList<>();
private boolean bIsPFlagSet = false;
private boolean bPFlag;
diff --git a/pcep/pcepio/src/main/java/org/onosproject/pcepio/protocol/ver1/PcepTEReportMsgVer1.java b/pcep/pcepio/src/main/java/org/onosproject/pcepio/protocol/ver1/PcepTEReportMsgVer1.java
index 35b19bd..9283308 100644
--- a/pcep/pcepio/src/main/java/org/onosproject/pcepio/protocol/ver1/PcepTEReportMsgVer1.java
+++ b/pcep/pcepio/src/main/java/org/onosproject/pcepio/protocol/ver1/PcepTEReportMsgVer1.java
@@ -69,7 +69,7 @@
return null;
}
- teReportList = new LinkedList<PcepTEObject>();
+ teReportList = new LinkedList<>();
byte version = cb.readByte();
version = (byte) (version >> PcepMessageVer1.SHIFT_FLAG);
diff --git a/pcep/pcepio/src/main/java/org/onosproject/pcepio/protocol/ver1/PcepUpdateMsgVer1.java b/pcep/pcepio/src/main/java/org/onosproject/pcepio/protocol/ver1/PcepUpdateMsgVer1.java
index 84fe375..53c6687 100644
--- a/pcep/pcepio/src/main/java/org/onosproject/pcepio/protocol/ver1/PcepUpdateMsgVer1.java
+++ b/pcep/pcepio/src/main/java/org/onosproject/pcepio/protocol/ver1/PcepUpdateMsgVer1.java
@@ -100,7 +100,7 @@
throw new PcepParseException("Readable bytes is less than update message minimum length");
}
- llUpdateRequestList = new LinkedList<PcepUpdateRequest>();
+ llUpdateRequestList = new LinkedList<>();
// fixed value property version == 1
byte version = cb.readByte();
diff --git a/pcep/pcepio/src/main/java/org/onosproject/pcepio/types/ErrorObjListWithOpen.java b/pcep/pcepio/src/main/java/org/onosproject/pcepio/types/ErrorObjListWithOpen.java
index ad5648b..24e4506 100644
--- a/pcep/pcepio/src/main/java/org/onosproject/pcepio/types/ErrorObjListWithOpen.java
+++ b/pcep/pcepio/src/main/java/org/onosproject/pcepio/types/ErrorObjListWithOpen.java
@@ -57,7 +57,7 @@
* @return error types list
*/
public LinkedList<Integer> getErrorType() {
- LinkedList<Integer> errorType = new LinkedList<Integer>();
+ LinkedList<Integer> errorType = new LinkedList<>();
if (llerrorObjList != null) {
ListIterator<PcepErrorObject> errObjListIterator = llerrorObjList.listIterator();
int error;
@@ -77,7 +77,7 @@
* @return error values list
*/
public LinkedList<Integer> getErrorValue() {
- LinkedList<Integer> errorValue = new LinkedList<Integer>();
+ LinkedList<Integer> errorValue = new LinkedList<>();
if (llerrorObjList != null) {
ListIterator<PcepErrorObject> errObjListIterator = llerrorObjList.listIterator();
int error;
diff --git a/pcep/pcepio/src/main/java/org/onosproject/pcepio/types/LocalTENodeDescriptorsTlv.java b/pcep/pcepio/src/main/java/org/onosproject/pcepio/types/LocalTENodeDescriptorsTlv.java
index b99955e..b31dac2 100644
--- a/pcep/pcepio/src/main/java/org/onosproject/pcepio/types/LocalTENodeDescriptorsTlv.java
+++ b/pcep/pcepio/src/main/java/org/onosproject/pcepio/types/LocalTENodeDescriptorsTlv.java
@@ -184,7 +184,7 @@
public static PcepValueType read(ChannelBuffer c, short hLength) throws PcepParseException {
// Node Descriptor Sub-TLVs (variable)
- LinkedList<PcepValueType> llNodeDescriptorSubTLVs = new LinkedList<PcepValueType>();
+ LinkedList<PcepValueType> llNodeDescriptorSubTLVs = new LinkedList<>();
ChannelBuffer tempCb = c.readBytes(hLength);
diff --git a/pcep/pcepio/src/main/java/org/onosproject/pcepio/types/PcepRsvpUserErrorSpec.java b/pcep/pcepio/src/main/java/org/onosproject/pcepio/types/PcepRsvpUserErrorSpec.java
index c7370a6..4a9357d 100644
--- a/pcep/pcepio/src/main/java/org/onosproject/pcepio/types/PcepRsvpUserErrorSpec.java
+++ b/pcep/pcepio/src/main/java/org/onosproject/pcepio/types/PcepRsvpUserErrorSpec.java
@@ -162,7 +162,7 @@
}
private static LinkedList<PcepValueType> parseErrSpecSubObj(ChannelBuffer cb) throws PcepParseException {
- LinkedList<PcepValueType> llRsvpUserSpecSubObj = new LinkedList<PcepValueType>();
+ LinkedList<PcepValueType> llRsvpUserSpecSubObj = new LinkedList<>();
while (0 < cb.readableBytes()) {
PcepValueType tlv = null;
short hType = cb.readShort();
diff --git a/pcep/pcepio/src/main/java/org/onosproject/pcepio/types/RemoteTENodeDescriptorsTlv.java b/pcep/pcepio/src/main/java/org/onosproject/pcepio/types/RemoteTENodeDescriptorsTlv.java
index c4538ef..2e53f67 100644
--- a/pcep/pcepio/src/main/java/org/onosproject/pcepio/types/RemoteTENodeDescriptorsTlv.java
+++ b/pcep/pcepio/src/main/java/org/onosproject/pcepio/types/RemoteTENodeDescriptorsTlv.java
@@ -187,7 +187,7 @@
public static PcepValueType read(ChannelBuffer c , short length) throws PcepParseException {
// Node Descriptor Sub-TLVs (variable)
- LinkedList<PcepValueType> llRemoteTENodeDescriptorSubTLVs = new LinkedList<PcepValueType>();
+ LinkedList<PcepValueType> llRemoteTENodeDescriptorSubTLVs = new LinkedList<>();
ChannelBuffer tempCb = c.readBytes(length);
diff --git a/pcep/pcepio/src/main/java/org/onosproject/pcepio/types/TELinkAttributesTlv.java b/pcep/pcepio/src/main/java/org/onosproject/pcepio/types/TELinkAttributesTlv.java
index 09f855b..b3b71ae 100644
--- a/pcep/pcepio/src/main/java/org/onosproject/pcepio/types/TELinkAttributesTlv.java
+++ b/pcep/pcepio/src/main/java/org/onosproject/pcepio/types/TELinkAttributesTlv.java
@@ -186,7 +186,7 @@
public static PcepValueType read(ChannelBuffer c, short hLength) throws PcepParseException {
// Node Descriptor Sub-TLVs (variable)
- LinkedList<PcepValueType> llLinkAttributesSubTLVs = new LinkedList<PcepValueType>();
+ LinkedList<PcepValueType> llLinkAttributesSubTLVs = new LinkedList<>();
ChannelBuffer tempCb = c.readBytes(hLength);
diff --git a/pcep/pcepio/src/main/java/org/onosproject/pcepio/types/TELinkDescriptorsTlv.java b/pcep/pcepio/src/main/java/org/onosproject/pcepio/types/TELinkDescriptorsTlv.java
index 5cf2783..b974cf8 100644
--- a/pcep/pcepio/src/main/java/org/onosproject/pcepio/types/TELinkDescriptorsTlv.java
+++ b/pcep/pcepio/src/main/java/org/onosproject/pcepio/types/TELinkDescriptorsTlv.java
@@ -183,7 +183,7 @@
public static PcepValueType read(ChannelBuffer c, short length) throws PcepParseException {
// Node Descriptor Sub-TLVs (variable)
- LinkedList<PcepValueType> llLinkDescriptorsSubTLVs = new LinkedList<PcepValueType>();
+ LinkedList<PcepValueType> llLinkDescriptorsSubTLVs = new LinkedList<>();
ChannelBuffer tempCb = c.readBytes(length);
diff --git a/pcep/pcepio/src/main/java/org/onosproject/pcepio/types/TENodeAttributesTlv.java b/pcep/pcepio/src/main/java/org/onosproject/pcepio/types/TENodeAttributesTlv.java
index c6a5be2..f18b75b 100644
--- a/pcep/pcepio/src/main/java/org/onosproject/pcepio/types/TENodeAttributesTlv.java
+++ b/pcep/pcepio/src/main/java/org/onosproject/pcepio/types/TENodeAttributesTlv.java
@@ -183,7 +183,7 @@
public static PcepValueType read(ChannelBuffer c, short hLength) throws PcepParseException {
// Node Descriptor Sub-TLVs (variable)
- LinkedList<PcepValueType> llNodeAttributesSubTLVs = new LinkedList<PcepValueType>();
+ LinkedList<PcepValueType> llNodeAttributesSubTLVs = new LinkedList<>();
ChannelBuffer tempCb = c.readBytes(hLength);
diff --git a/pcep/pcepio/src/test/java/org/onosproject/pcepio/RemoteTENodeDescriptorsTlvTest.java b/pcep/pcepio/src/test/java/org/onosproject/pcepio/RemoteTENodeDescriptorsTlvTest.java
index e945b32..5ba7dd1 100644
--- a/pcep/pcepio/src/test/java/org/onosproject/pcepio/RemoteTENodeDescriptorsTlvTest.java
+++ b/pcep/pcepio/src/test/java/org/onosproject/pcepio/RemoteTENodeDescriptorsTlvTest.java
@@ -36,11 +36,11 @@
private final AutonomousSystemTlv autonomousSystemTlv2 = new AutonomousSystemTlv(20);
private final BGPLSidentifierTlv bGPLSidentifierTlv2 = new BGPLSidentifierTlv(30);
- private final LinkedList<PcepValueType> llRemoteTENodeDescriptorSubTLV1 = new LinkedList<PcepValueType>();
+ private final LinkedList<PcepValueType> llRemoteTENodeDescriptorSubTLV1 = new LinkedList<>();
private final boolean a = llRemoteTENodeDescriptorSubTLV1.add(autonomousSystemTlv1);
private final boolean b = llRemoteTENodeDescriptorSubTLV1.add(bGPLSidentifierTlv1);
- private final LinkedList<PcepValueType> llRemoteTENodeDescriptorSubTLV2 = new LinkedList<PcepValueType>();
+ private final LinkedList<PcepValueType> llRemoteTENodeDescriptorSubTLV2 = new LinkedList<>();
private final boolean c = llRemoteTENodeDescriptorSubTLV2.add(autonomousSystemTlv2);
private final boolean d = llRemoteTENodeDescriptorSubTLV2.add(bGPLSidentifierTlv2);
diff --git a/pcep/pcepio/src/test/java/org/onosproject/pcepio/TELinkAttributesTlvTest.java b/pcep/pcepio/src/test/java/org/onosproject/pcepio/TELinkAttributesTlvTest.java
index a33462a..3834468 100644
--- a/pcep/pcepio/src/test/java/org/onosproject/pcepio/TELinkAttributesTlvTest.java
+++ b/pcep/pcepio/src/test/java/org/onosproject/pcepio/TELinkAttributesTlvTest.java
@@ -38,11 +38,11 @@
private final MaximumReservableLinkBandwidthTlv maximumReservableLinkBandwidthTlv2 =
new MaximumReservableLinkBandwidthTlv(30);
- private final LinkedList<PcepValueType> llLinkAttributesSubTLV1 = new LinkedList<PcepValueType>();
+ private final LinkedList<PcepValueType> llLinkAttributesSubTLV1 = new LinkedList<>();
private final boolean a = llLinkAttributesSubTLV1.add(administrativeGroupTlv1);
private final boolean b = llLinkAttributesSubTLV1.add(maximumReservableLinkBandwidthTlv1);
- private final LinkedList<PcepValueType> llLinkAttributesSubTLV2 = new LinkedList<PcepValueType>();
+ private final LinkedList<PcepValueType> llLinkAttributesSubTLV2 = new LinkedList<>();
private final boolean c = llLinkAttributesSubTLV2.add(administrativeGroupTlv2);
private final boolean d = llLinkAttributesSubTLV2.add(maximumReservableLinkBandwidthTlv2);
diff --git a/pcep/pcepio/src/test/java/org/onosproject/pcepio/TELinkDescriptorsTlvTest.java b/pcep/pcepio/src/test/java/org/onosproject/pcepio/TELinkDescriptorsTlvTest.java
index b669ee0..6c323c0 100644
--- a/pcep/pcepio/src/test/java/org/onosproject/pcepio/TELinkDescriptorsTlvTest.java
+++ b/pcep/pcepio/src/test/java/org/onosproject/pcepio/TELinkDescriptorsTlvTest.java
@@ -37,11 +37,11 @@
LinkLocalRemoteIdentifiersTlv(20, 20);
private final IPv4InterfaceAddressTlv iPv4InterfaceAddressTlv2 = new IPv4InterfaceAddressTlv(0x02020202);
- private final LinkedList<PcepValueType> llLinkDescriptorsSubTLVs1 = new LinkedList<PcepValueType>();
+ private final LinkedList<PcepValueType> llLinkDescriptorsSubTLVs1 = new LinkedList<>();
private final boolean a = llLinkDescriptorsSubTLVs1.add(linkLocalRemoteIdentifiersTlv1);
private final boolean b = llLinkDescriptorsSubTLVs1.add(iPv4InterfaceAddressTlv1);
- private final LinkedList<PcepValueType> llLinkDescriptorsSubTLVs2 = new LinkedList<PcepValueType>();
+ private final LinkedList<PcepValueType> llLinkDescriptorsSubTLVs2 = new LinkedList<>();
private final boolean c = llLinkDescriptorsSubTLVs2.add(linkLocalRemoteIdentifiersTlv2);
private final boolean d = llLinkDescriptorsSubTLVs2.add(iPv4InterfaceAddressTlv2);
diff --git a/pcep/pcepio/src/test/java/org/onosproject/pcepio/TENodeAttributesTlvTest.java b/pcep/pcepio/src/test/java/org/onosproject/pcepio/TENodeAttributesTlvTest.java
index bf27a1c..4faa499 100644
--- a/pcep/pcepio/src/test/java/org/onosproject/pcepio/TENodeAttributesTlvTest.java
+++ b/pcep/pcepio/src/test/java/org/onosproject/pcepio/TENodeAttributesTlvTest.java
@@ -38,11 +38,11 @@
private final IPv4TERouterIdOfLocalNodeTlv iPv4TERouterIdOfLocalNodeTlv2 = new
IPv4TERouterIdOfLocalNodeTlv(0x02020202);
- private final LinkedList<PcepValueType> llNodeAttributesSubTLV1 = new LinkedList<PcepValueType>();
+ private final LinkedList<PcepValueType> llNodeAttributesSubTLV1 = new LinkedList<>();
private final boolean a = llNodeAttributesSubTLV1.add(nodeFlagBitsTlv1);
private final boolean b = llNodeAttributesSubTLV1.add(iPv4TERouterIdOfLocalNodeTlv1);
- private final LinkedList<PcepValueType> llNodeAttributesSubTLV2 = new LinkedList<PcepValueType>();
+ private final LinkedList<PcepValueType> llNodeAttributesSubTLV2 = new LinkedList<>();
private final boolean c = llNodeAttributesSubTLV2.add(nodeFlagBitsTlv2);
private final boolean d = llNodeAttributesSubTLV2.add(iPv4TERouterIdOfLocalNodeTlv2);