From 27ed5fad6ca00a7089927e9bc5cdd93f1d5c1651 Mon Sep 17 00:00:00 2001 From: Mamtha Date: Sat, 11 Apr 2020 00:50:31 +0530 Subject: test commit. sonar fixes Issue-ID: AAF-1031 Change-Id: I96ce88c32cfc0a6a7e1250f713c8379dfe097369 Signed-off-by: Mamtha --- .../onap/aaf/auth/batch/reports/ApprovedRpt.java | 28 +++------------------- 1 file changed, 3 insertions(+), 25 deletions(-) (limited to 'auth') 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 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); -- cgit 1.2.3-korg