commit | 7b332f168fbba799e4fe69416ff8216abdabe2dc | [log] [tgz] |
---|---|---|
author | Ray Milkey <ray@opennetworking.org> | Fri Jan 19 09:59:16 2018 -0800 |
committer | Ray Milkey <ray@opennetworking.org> | Fri Jan 19 18:23:04 2018 +0000 |
tree | a7645a0a784ff4ef8220d4140a8f3105efccbd90 | |
parent | fe0e085ed2869bb5ddd70731b82667c90294207b [diff] |
SONAR suggestion - possible NPE if date is not set Change-Id: I35a58ad7a5f82250fa56f49cdca4a22b437ea202
diff --git a/protocols/pcep/server/ctl/src/main/java/org/onosproject/pcep/server/impl/PcepChannelHandler.java b/protocols/pcep/server/ctl/src/main/java/org/onosproject/pcep/server/impl/PcepChannelHandler.java index dce5fa0..596a633 100644 --- a/protocols/pcep/server/ctl/src/main/java/org/onosproject/pcep/server/impl/PcepChannelHandler.java +++ b/protocols/pcep/server/ctl/src/main/java/org/onosproject/pcep/server/impl/PcepChannelHandler.java
@@ -485,9 +485,8 @@ * @throws PcepParseException while building pcep error message */ public void processUnknownMsg() throws PcepParseException { - Date now = null; + Date now = new Date(); if (pcepPacketStats.wrongPacketCount() == 0) { - now = new Date(); pcepPacketStats.setTime(now.getTime()); pcepPacketStats.addWrongPacket(); sendErrMsgForInvalidMsg();