diff options
author | Arundathi Patil <arundpil@in.ibm.com> | 2019-07-28 01:42:50 +0530 |
---|---|---|
committer | Arundathi Patil <arundpil@in.ibm.com> | 2019-07-28 01:42:58 +0530 |
commit | de5f58719eea97ac92085568974b6c87af5e0e55 (patch) | |
tree | eedf6c91eaa40a6fadaf1f07efe9f9c41f2288e5 | |
parent | 73fe8ba55543a74a249c9adc993ac78ccddbabd6 (diff) |
Sonar Fix: ApprovalDAO.java
Fixed sonar issues across this file
Issue-ID: AAF-912
Change-Id: I030cf2e17e52fa8efe2bc2f003222794e7f9c55a
Signed-off-by: Arundathi Patil <arundpil@in.ibm.com>
-rw-r--r-- | auth/auth-cass/src/main/java/org/onap/aaf/auth/dao/cass/ApprovalDAO.java | 25 |
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); |