diff options
author | Arundathi Patil <arundpil@in.ibm.com> | 2019-09-16 13:44:41 +0530 |
---|---|---|
committer | Arundathi Patil <arundpil@in.ibm.com> | 2019-09-16 13:44:51 +0530 |
commit | f9901518f13b32233541032667a5ff3aca9e17f8 (patch) | |
tree | 05e7045b3e7095ef9e2f18e4a3eedb77c810dc58 /auth | |
parent | 7afca63faf20cf6ee680f80e08d4cfebecbab9c8 (diff) |
Sonar fix: ApprovalDAO.java
Fixed sonar issues across this file
Issue-ID: AAF-968
Change-Id: Icca44e89aa28d56e0690a488a68427c2b085f64f
Signed-off-by: Arundathi Patil <arundpil@in.ibm.com>
Diffstat (limited to 'auth')
-rw-r--r-- | auth/auth-cass/src/main/java/org/onap/aaf/auth/dao/cass/ApprovalDAO.java | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/auth/auth-cass/src/main/java/org/onap/aaf/auth/dao/cass/ApprovalDAO.java b/auth/auth-cass/src/main/java/org/onap/aaf/auth/dao/cass/ApprovalDAO.java index 7e90bbb9..5583dc03 100644 --- a/auth/auth-cass/src/main/java/org/onap/aaf/auth/dao/cass/ApprovalDAO.java +++ b/auth/auth-cass/src/main/java/org/onap/aaf/auth/dao/cass/ApprovalDAO.java @@ -57,6 +57,7 @@ public class ApprovalDAO extends CassDAOImpl<AuthzTrans,ApprovalDAO.Data> { private PSInfo psByTicket; private PSInfo psByStatus; + private static final int KEYLIMIT = 1; public ApprovalDAO(AuthzTrans trans, Cluster cluster, String keyspace) { super(trans, ApprovalDAO.class.getSimpleName(),cluster,keyspace,Data.class,TABLE, readConsistency(trans,TABLE), writeConsistency(trans,TABLE)); @@ -71,7 +72,6 @@ public class ApprovalDAO extends CassDAOImpl<AuthzTrans,ApprovalDAO.Data> { init(trans); } - private static final int KEYLIMIT = 1; public static class Data { public UUID id; public UUID ticket; @@ -81,7 +81,6 @@ public class ApprovalDAO extends CassDAOImpl<AuthzTrans,ApprovalDAO.Data> { public String status; public String memo; public String operation; -// public Date last_notified; public Date updated; } @@ -102,7 +101,6 @@ public class ApprovalDAO extends CassDAOImpl<AuthzTrans,ApprovalDAO.Data> { data.status = row.getString(5); data.memo = row.getString(6); data.operation = row.getString(7); -// data.last_notified = row.getTimestamp(8); // This is used to get "WRITETIME(STATUS)" from Approval, which gives us an "updated" if (row.getColumnDefinitions().size()>8) { // Rows reported in MicroSeconds @@ -117,8 +115,8 @@ public class ApprovalDAO extends CassDAOImpl<AuthzTrans,ApprovalDAO.Data> { } @Override - protected void body(Data data, int _idx, Object[] obj) { - int idx = _idx; + protected void body(Data data, int idxParam, Object[] obj) { + int idx = idxParam; obj[idx]=data.ticket; obj[++idx]=data.user; obj[++idx]=data.approver; @@ -126,7 +124,6 @@ public class ApprovalDAO extends CassDAOImpl<AuthzTrans,ApprovalDAO.Data> { obj[++idx]=data.status; obj[++idx]=data.memo; obj[++idx]=data.operation; -// obj[++idx]=data.last_notified; } } |