diff options
Diffstat (limited to 'auth/auth-cass')
-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); + } } } } |