aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArundathi Patil <arundpil@in.ibm.com>2018-09-03 15:21:29 +0530
committerIBM602-PC0F1E3C\Arundathi <arundpil@in.ibm.com>2018-09-03 15:21:39 +0530
commit57e26c1944dd7fb378d280f71ff29c09390e4981 (patch)
tree8eb52358b2af8adb390d637cf1568265372adf56
parent60a215503f38974c409c963d3f3a8154be01bdd5 (diff)
MusicLockState.java: Fixed sonar issue
Fixed sonar code-smells/issues accross this file Issue-ID: MUSIC-123 Change-Id: I7b288ea53029488e827f31c1dabd7ad276de97a2 Signed-off-by: Arundathi Patil <arundpil@in.ibm.com>
-rw-r--r--src/main/java/org/onap/music/lockingservice/MusicLockState.java5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/main/java/org/onap/music/lockingservice/MusicLockState.java b/src/main/java/org/onap/music/lockingservice/MusicLockState.java
index 6c31410f..04a1e6b2 100644
--- a/src/main/java/org/onap/music/lockingservice/MusicLockState.java
+++ b/src/main/java/org/onap/music/lockingservice/MusicLockState.java
@@ -44,7 +44,8 @@ public class MusicLockState implements Serializable {
LockStatus lockStatus;
boolean needToSyncQuorum = false;
String lockHolder;
- long leasePeriod = Long.MAX_VALUE, leaseStartTime = -1;
+ long leasePeriod = Long.MAX_VALUE;
+ long leaseStartTime = -1;
private String errorMessage = null;
@@ -117,6 +118,7 @@ public class MusicLockState implements Serializable {
out = new ObjectOutputStream(bos);
out.writeObject(this);
} catch (IOException e) {
+ logger.error("Error", e);
logger.error(EELFLoggerDelegate.errorLogger, e.getMessage(),AppMessages.IOERROR, ErrorSeverity.ERROR, ErrorTypes.CONNECTIONERROR);
}
return bos.toByteArray();
@@ -130,6 +132,7 @@ public class MusicLockState implements Serializable {
in = new ObjectInputStream(bis);
o = in.readObject();
} catch (ClassNotFoundException | IOException e) {
+ logger.error("Error", e);
logger.error(EELFLoggerDelegate.errorLogger, e.getMessage(),AppMessages.UNKNOWNERROR, ErrorSeverity.ERROR, ErrorTypes.UNKNOWN);
}
return (MusicLockState) o;