diff options
author | Instrumental <jcgmisc@stl.gathman.org> | 2018-03-29 20:26:02 -0500 |
---|---|---|
committer | Instrumental <jcgmisc@stl.gathman.org> | 2018-03-29 20:26:11 -0500 |
commit | 36b62be84b398044e1feae657c662dba6247782f (patch) | |
tree | d537940a473259de2f2d97579607d7cbfa9906d1 /auth/auth-cass/src/main/java/org | |
parent | d86dd644e1543743cfcbc83b230bd4f2cb2e5d4e (diff) |
Clean up Sonar results 2
Issue-ID: AAF-206
Change-Id: Ia000b144be58af970f4a5264ca5a9718fdbf9f5d
Signed-off-by: Instrumental <jcgmisc@stl.gathman.org>
Diffstat (limited to 'auth/auth-cass/src/main/java/org')
-rw-r--r-- | auth/auth-cass/src/main/java/org/onap/aaf/auth/dao/cass/CredDAO.java | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/auth/auth-cass/src/main/java/org/onap/aaf/auth/dao/cass/CredDAO.java b/auth/auth-cass/src/main/java/org/onap/aaf/auth/dao/cass/CredDAO.java index 7a85ae1a..76e3b424 100644 --- a/auth/auth-cass/src/main/java/org/onap/aaf/auth/dao/cass/CredDAO.java +++ b/auth/auth-cass/src/main/java/org/onap/aaf/auth/dao/cass/CredDAO.java @@ -185,8 +185,10 @@ public class CredDAO extends CassDAOImpl<AuthzTrans,CredDAO.Data> { data.cred=null; if(i>=0) { byte[] bytes = new byte[i]; // a bit dangerous, but lessened because of all the previous sized data reads - is.read(bytes); - data.cred = ByteBuffer.wrap(bytes); + int read = is.read(bytes); + if(read>0) { + data.cred = ByteBuffer.wrap(bytes); + } } } } |