summaryrefslogtreecommitdiffstats
path: root/auth
diff options
context:
space:
mode:
authorMamtha <mamtha.sabesan@in.ibm.com>2020-04-11 00:50:31 +0530
committerMamtha <mamtha.sabesan@in.ibm.com>2020-04-11 01:42:44 +0530
commit27ed5fad6ca00a7089927e9bc5cdd93f1d5c1651 (patch)
tree5bb3516ee7c53f163c91f15e384596a7798e4286 /auth
parentd2f8381eeef23535e17b770022060a5ba06eedba (diff)
test commit. sonar fixes
Issue-ID: AAF-1031 Change-Id: I96ce88c32cfc0a6a7e1250f713c8379dfe097369 Signed-off-by: Mamtha <mamtha.sabesan@in.ibm.com>
Diffstat (limited to 'auth')
-rw-r--r--auth/auth-batch/src/main/java/org/onap/aaf/auth/batch/reports/ApprovedRpt.java28
1 files changed, 3 insertions, 25 deletions
diff --git a/auth/auth-batch/src/main/java/org/onap/aaf/auth/batch/reports/ApprovedRpt.java b/auth/auth-batch/src/main/java/org/onap/aaf/auth/batch/reports/ApprovedRpt.java
index f346f7dd..4d6af8a0 100644
--- a/auth/auth-batch/src/main/java/org/onap/aaf/auth/batch/reports/ApprovedRpt.java
+++ b/auth/auth-batch/src/main/java/org/onap/aaf/auth/batch/reports/ApprovedRpt.java
@@ -48,7 +48,7 @@ public class ApprovedRpt extends Batch {
private Date now;
private Writer approvedW;
private CSV historyR;
- private static String yr_mon;
+ private static String yearMon;
public ApprovedRpt(AuthzTrans trans) throws APIException, IOException, OrganizationException {
super(trans.env());
@@ -64,7 +64,7 @@ public class ApprovedRpt extends Batch {
historyR = new CSV(env.access(),args()[1]).setDelimiter('|');
- yr_mon = args()[0];
+ yearMon = args()[0];
} finally {
tt0.done();
}
@@ -73,34 +73,12 @@ public class ApprovedRpt extends Batch {
@Override
protected void run(AuthzTrans trans) {
try {
-// ResultSet results;
-// Statement stmt = new SimpleStatement( "select dateof(id), approver, status, user, type, memo from authz.approved;" );
-// results = session.execute(stmt);
-// Iterator<Row> iter = results.iterator();
-// Row row;
- /*
- * while (iter.hasNext()) {
- ++totalLoaded;
- row = iter.next();
- d = row.getTimestamp(0);
- if(d.after(begin)) {
- approvedW.row("aprvd",
- Chrono.dateOnlyStamp(d),
- row.getString(1),
- row.getString(2),
- row.getString(3),
- row.getString(4),
- row.getString(5)
- );
- }
- }
- */
GregorianCalendar gc = new GregorianCalendar();
gc.add(GregorianCalendar.MONTH, -2);
approvedW.comment("date, approver, status, user, role, memo");
historyR.visit(row -> {
String s = row.get(7);
- if(s.equals(yr_mon)) {
+ if(s.equals(yearMon)) {
String target = row.get(5);
if("user_role".equals(target)) {
String action = row.get(1);