X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=auth%2Fauth-cass%2Fsrc%2Fmain%2Fjava%2Forg%2Fonap%2Faaf%2Fauth%2Fdao%2Fcass%2FCredDAO.java;h=7674c7e85cb2fd3b8f2538b7faa08cf3c6a7a494;hb=7e966914050e66219689001ff4ab601a49eef0ac;hp=5bcba9d91d5a05d8048c0acb4b650f73bf6af664;hpb=ead32f193586e39b59bb366bddf70e665173a52d;p=aaf%2Fauthz.git 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 5bcba9d9..7674c7e8 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 @@ -158,7 +158,7 @@ public class CredDAO extends CassDAOImpl { os.writeInt(data.other==null?0:data.other); writeString(os, data.ns); writeString(os, data.notes); - if(data.cred==null) { + if (data.cred==null) { os.writeInt(-1); } else { int l = data.cred.limit()-data.cred.position(); @@ -183,10 +183,10 @@ public class CredDAO extends CassDAOImpl { int i = is.readInt(); data.cred=null; - if(i>=0) { + if (i>=0) { byte[] bytes = new byte[i]; // a bit dangerous, but lessened because of all the previous sized data reads int read = is.read(bytes); - if(read>0) { + if (read>0) { data.cred = ByteBuffer.wrap(bytes); } } @@ -195,10 +195,10 @@ public class CredDAO extends CassDAOImpl { private void init(AuthzTrans trans) throws APIException, IOException { // Set up sub-DAOs - if(historyDAO==null) { + if (historyDAO==null) { historyDAO = new HistoryDAO(trans,this); } - if(infoDAO==null) { + if (infoDAO==null) { infoDAO = new CacheInfoDAO(trans,this); } @@ -241,7 +241,7 @@ public class CredDAO extends CassDAOImpl { ? String.format("%s by %s", override[0], hd.user) : (modified.name() + "d credential for " + data.id); // Detail? - if(modified==CRUD.delete) { + if (modified==CRUD.delete) { try { hd.reconstruct = data.bytify(); } catch (IOException e) { @@ -249,10 +249,10 @@ public class CredDAO extends CassDAOImpl { } } - if(historyDAO.create(trans, hd).status!=Status.OK) { + if (historyDAO.create(trans, hd).status!=Status.OK) { trans.error().log("Cannot log to History"); } - if(infoDAO.touch(trans, TABLE,data.invalidate(cache)).status!=Status.OK) { + if (infoDAO.touch(trans, TABLE,data.invalidate(cache)).status!=Status.OK) { trans.error().log("Cannot touch Cred"); } }