summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorajay priyadarshi <ajay.priyadarshi@ril.com>2018-03-20 10:36:16 +0530
committerajay priyadarshi <ajay.priyadarshi@ril.com>2018-03-20 10:36:16 +0530
commit3a8451977cc2092b0b998573dc0b27243fdcc137 (patch)
tree88ef96308171f72b967d0b957c56d4bc7b2857cf
parent1315f3eb6c66ff7d883a5981d84b2fdce904466e (diff)
sonar fix:Exception handling in emsdriver
collector/TaskThread.java file name: MessageUtil.java Change-Id: I6f5700f731f62ef34fb33f9107564293a0e91d54 Issue-ID: VFC-829 Signed-off-by: ajay priyadarshi <ajay.priyadarshi@ril.com>
-rw-r--r--ems/boco/src/main/java/org/onap/vfc/nfvo/emsdriver/collector/TaskThread.java6
-rw-r--r--ems/boco/src/main/java/org/onap/vfc/nfvo/emsdriver/collector/alarm/MessageUtil.java4
2 files changed, 5 insertions, 5 deletions
diff --git a/ems/boco/src/main/java/org/onap/vfc/nfvo/emsdriver/collector/TaskThread.java b/ems/boco/src/main/java/org/onap/vfc/nfvo/emsdriver/collector/TaskThread.java
index da48829..94d9c56 100644
--- a/ems/boco/src/main/java/org/onap/vfc/nfvo/emsdriver/collector/TaskThread.java
+++ b/ems/boco/src/main/java/org/onap/vfc/nfvo/emsdriver/collector/TaskThread.java
@@ -43,7 +43,7 @@ import java.util.regex.Pattern;
public class TaskThread implements Runnable {
private static final Log log = LogFactory.getLog(TaskThread.class);
- private MessageChannel pmResultChannel; //This should also be private. Need to change in TastThreadTest
+ private MessageChannel pmResultChannel;
private MessageChannel cmResultChannel;
private CollectMsg data;
@@ -929,7 +929,7 @@ public class TaskThread implements Runnable {
return pmResultChannel;
}
- public void setPmResultChannel(MessageChannel pmResultChannel) {
- this.pmResultChannel = pmResultChannel;
+ public void setPmResultChannel(MessageChannel pmResChannel) {
+ this.pmResultChannel = pmResChannel;
}
}
diff --git a/ems/boco/src/main/java/org/onap/vfc/nfvo/emsdriver/collector/alarm/MessageUtil.java b/ems/boco/src/main/java/org/onap/vfc/nfvo/emsdriver/collector/alarm/MessageUtil.java
index eede19b..d7a4dd8 100644
--- a/ems/boco/src/main/java/org/onap/vfc/nfvo/emsdriver/collector/alarm/MessageUtil.java
+++ b/ems/boco/src/main/java/org/onap/vfc/nfvo/emsdriver/collector/alarm/MessageUtil.java
@@ -77,7 +77,7 @@ public class MessageUtil {
dis.readFully(inputB);
short startSign = ois.readShort();
if (startSign != Msg.StartSign) {
- throw new Exception("start sign is [" + Msg.StartSign
+ throw new IOException("start sign is [" + Msg.StartSign
+ "],not is [" + startSign + "]");
}
int msgType = ois.readByte();
@@ -86,7 +86,7 @@ public class MessageUtil {
msg.setTimeStamp(timeStamp);
int bodylength = ois.readShort();
msg.setLenOfBody(bodylength);
- byte b[] = new byte[bodylength];
+ byte[] b = new byte[bodylength];
dis.readFully(b);
msg.newBodyfromBytes(b);
} catch (Exception e) {