diff options
author | Thomas Nelson arthudent3 <nelson24@att.com> | 2019-06-19 22:19:10 +0000 |
---|---|---|
committer | Thomas Nelson arthudent3 <nelson24@att.com> | 2019-06-25 13:20:59 +0000 |
commit | 881f14bc8676cedd68e17bd007a869fa85578fa1 (patch) | |
tree | 0dc37c36af2483d5d0925dd84993f93f344688f8 /src/main/java/org/onap/music/response/jsonobjects | |
parent | 078f69315e4b4faffc50e1c7dfde717396e48194 (diff) |
Some bug fixes and Minor Chages.
Remove some Commented out code.
Cleaned up Variables.
Encryption of passwords added
Updated Test Cases
Fixed some errors in how they were reported.
Reduced Logging clutter
Some Vulnerability fixes.
Change-Id: I64c7935d167d4a976681b5a18fd51aa667d0cd95
Issue-ID: MUSIC-413
Signed-off-by: Thomas Nelson arthudent3 <nelson24@att.com>
Diffstat (limited to 'src/main/java/org/onap/music/response/jsonobjects')
-rw-r--r-- | src/main/java/org/onap/music/response/jsonobjects/JsonResponse.java | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/src/main/java/org/onap/music/response/jsonobjects/JsonResponse.java b/src/main/java/org/onap/music/response/jsonobjects/JsonResponse.java index 2c419e18..f0793dc2 100644 --- a/src/main/java/org/onap/music/response/jsonobjects/JsonResponse.java +++ b/src/main/java/org/onap/music/response/jsonobjects/JsonResponse.java @@ -56,9 +56,19 @@ public class JsonResponse { private LockStatus lockStatus; private List<String> lockHolders; private String lockLease; + private boolean isLockHolders=false; - /** + public boolean isLockHolders() { + return isLockHolders; + } + + public JsonResponse setisLockHolders(boolean isLockHolders) { + this.isLockHolders = isLockHolders; + return this; + } + + /** * Create a JSONLock Response * Use setters to provide more information as in * JsonLockResponse(ResultType.SUCCESS).setMessage("We did it").setLock(mylockname) @@ -282,7 +292,7 @@ public class JsonResponse { lockMap.put("lock-status", lockStatus); } if (lockHolders != null && !lockHolders.isEmpty()) { - if (lockHolders.size()==1) { + if (lockHolders.size()==1 && !isLockHolders) { //for backwards compatability lockMap.put("lock-holder", lockHolders.get(0)); } else { |