summaryrefslogtreecommitdiffstats
path: root/auth
diff options
context:
space:
mode:
authorJonathan Gathman <jonathan.gathman@att.com>2019-08-07 15:24:03 +0000
committerGerrit Code Review <gerrit@onap.org>2019-08-07 15:24:03 +0000
commit321dce367d74092a0ba09930c3aa526abdbd5da8 (patch)
tree64df54b893f748cac66d0ccc4802eb22ebc148b0 /auth
parent7a7c59ec486257d3a990a9d9a7b8bb515dad86f7 (diff)
parentde5f58719eea97ac92085568974b6c87af5e0e55 (diff)
Merge "Sonar Fix: ApprovalDAO.java"
Diffstat (limited to 'auth')
-rw-r--r--auth/auth-cass/src/main/java/org/onap/aaf/auth/dao/cass/ApprovalDAO.java25
1 files changed, 18 insertions, 7 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 4c66c964..54f57449 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
@@ -3,6 +3,8 @@
* org.onap.aaf
* ===========================================================================
* Copyright (c) 2018 AT&T Intellectual Property. All rights reserved.
+ *
+ * Modification Copyright (c) 2019 IBM
* ===========================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -50,7 +52,10 @@ public class ApprovalDAO extends CassDAOImpl<AuthzTrans,ApprovalDAO.Data> {
private static final String TABLE = "approval";
private static final String TABLELOG = "approved";
private HistoryDAO historyDAO;
- private PSInfo psByUser, psByApprover, psByTicket, psByStatus;
+ private PSInfo psByUser;
+ private PSInfo psByApprover;
+ private PSInfo psByTicket;
+ private PSInfo psByStatus;
public ApprovalDAO(AuthzTrans trans, Cluster cluster, String keyspace) {
@@ -213,12 +218,18 @@ public class ApprovalDAO extends CassDAOImpl<AuthzTrans,ApprovalDAO.Data> {
sb.append(TABLELOG);
sb.append(" (id,user,approver,type,status,memo,operation) VALUES (");
sb.append(data.id);
- sb.append(",'"); sb.append(data.user);
- sb.append("','"); sb.append(data.approver);
- sb.append("','"); sb.append(data.type);
- sb.append("','"); sb.append(data.status);
- sb.append("','"); sb.append(data.memo.replace("'", "''"));
- sb.append("','"); sb.append(data.operation);
+ sb.append(",'");
+ sb.append(data.user);
+ sb.append("','");
+ sb.append(data.approver);
+ sb.append("','");
+ sb.append(data.type);
+ sb.append("','");
+ sb.append(data.status);
+ sb.append("','");
+ sb.append(data.memo.replace("'", "''"));
+ sb.append("','");
+ sb.append(data.operation);
sb.append("');\n");
sb.append("DELETE FROM ");
sb.append(TABLE);