summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBharath Balasubramanian <bharathb@research.att.com>2018-09-03 20:36:33 +0000
committerGerrit Code Review <gerrit@onap.org>2018-09-03 20:36:33 +0000
commitd74bc0962a011e47eeeaa4fd07571645d5befe68 (patch)
treea318c6aba664fa9106c3e5a4bd08f9ade57d9101
parenta6e37de1411ae04f49347d72121c3a4d3f6fd0ac (diff)
parent57e26c1944dd7fb378d280f71ff29c09390e4981 (diff)
Merge "MusicLockState.java: Fixed sonar issue"
-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;