summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--auth/auth-batch/src/main/java/org/onap/aaf/auth/batch/helpers/Visitor.java2
-rw-r--r--auth/auth-batch/src/main/java/org/onap/aaf/auth/batch/reports/ApprovedRpt.java31
-rw-r--r--auth/auth-batch/src/main/java/org/onap/aaf/auth/batch/reports/bodies/NotifyCredBody.java2
-rw-r--r--auth/auth-batch/src/main/java/org/onap/aaf/auth/batch/reports/bodies/OneMonthNotifyCredBody.java2
-rw-r--r--auth/auth-batch/src/main/java/org/onap/aaf/auth/batch/reports/bodies/OneWeekNotifyCredBody.java2
-rw-r--r--auth/auth-cass/src/main/java/org/onap/aaf/auth/dao/Cacheable.java2
-rw-r--r--auth/auth-cass/src/main/java/org/onap/aaf/auth/dao/hl/Question.java1
-rw-r--r--cadi/core/src/main/java/org/onap/aaf/cadi/AES.java2
8 files changed, 9 insertions, 35 deletions
diff --git a/auth/auth-batch/src/main/java/org/onap/aaf/auth/batch/helpers/Visitor.java b/auth/auth-batch/src/main/java/org/onap/aaf/auth/batch/helpers/Visitor.java
index 38a76477..3e7b30b2 100644
--- a/auth/auth-batch/src/main/java/org/onap/aaf/auth/batch/helpers/Visitor.java
+++ b/auth/auth-batch/src/main/java/org/onap/aaf/auth/batch/helpers/Visitor.java
@@ -3,6 +3,7 @@
* org.onap.aaf
* ===========================================================================
* Copyright (c) 2018 AT&T Intellectual Property. All rights reserved.
+ * Modifications 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.
@@ -20,6 +21,7 @@
package org.onap.aaf.auth.batch.helpers;
+@FunctionalInterface
public interface Visitor<T> {
void visit(T t);
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 b2fd8a9a..ea196b1f 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
@@ -3,6 +3,7 @@
* org.onap.aaf
* ===========================================================================
* Copyright (c) 2018 AT&T Intellectual Property. All rights reserved.
+ * Modifications 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.
@@ -63,13 +64,6 @@ public class ApprovedRpt extends Batch {
TimeTaken tt0 = trans.start("Cassandra Initialization", Env.SUB);
try {
-// TimeTaken tt = trans.start("Connect to Cluster", Env.REMOTE);
-// try {
-// session = cluster.connect();
-// } finally {
-// tt.done();
-// }
-
now = new Date();
String sdate = Chrono.dateOnlyStamp(now);
File file = new File(logDir(),APPR_RPT + sdate +CSV);
@@ -90,29 +84,6 @@ public class ApprovedRpt extends Batch {
Map<String,Boolean> checked = new TreeMap<String, Boolean>();
final AuthzTrans transNoAvg = trans.env().newTransNoAvg();
-// 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)
- );
- }
- }
-
- */
int totalLoaded = 0;
Date d;
GregorianCalendar gc = new GregorianCalendar();
diff --git a/auth/auth-batch/src/main/java/org/onap/aaf/auth/batch/reports/bodies/NotifyCredBody.java b/auth/auth-batch/src/main/java/org/onap/aaf/auth/batch/reports/bodies/NotifyCredBody.java
index 7001c024..8eaf6a86 100644
--- a/auth/auth-batch/src/main/java/org/onap/aaf/auth/batch/reports/bodies/NotifyCredBody.java
+++ b/auth/auth-batch/src/main/java/org/onap/aaf/auth/batch/reports/bodies/NotifyCredBody.java
@@ -22,7 +22,7 @@
*/
package org.onap.aaf.auth.batch.reports.bodies;
-import java.io.IOException;
+
import java.util.GregorianCalendar;
import java.util.List;
diff --git a/auth/auth-batch/src/main/java/org/onap/aaf/auth/batch/reports/bodies/OneMonthNotifyCredBody.java b/auth/auth-batch/src/main/java/org/onap/aaf/auth/batch/reports/bodies/OneMonthNotifyCredBody.java
index 8747ebf8..417d4be4 100644
--- a/auth/auth-batch/src/main/java/org/onap/aaf/auth/batch/reports/bodies/OneMonthNotifyCredBody.java
+++ b/auth/auth-batch/src/main/java/org/onap/aaf/auth/batch/reports/bodies/OneMonthNotifyCredBody.java
@@ -26,7 +26,7 @@ import org.onap.aaf.auth.batch.helpers.ExpireRange;
import org.onap.aaf.cadi.Access;
public class OneMonthNotifyCredBody extends NotifyCredBody {
- public OneMonthNotifyCredBody(Access access) throws IOException {
+ public OneMonthNotifyCredBody(Access access){
super(access, ExpireRange.ONE_MONTH);
}
diff --git a/auth/auth-batch/src/main/java/org/onap/aaf/auth/batch/reports/bodies/OneWeekNotifyCredBody.java b/auth/auth-batch/src/main/java/org/onap/aaf/auth/batch/reports/bodies/OneWeekNotifyCredBody.java
index a1277d55..dae48d85 100644
--- a/auth/auth-batch/src/main/java/org/onap/aaf/auth/batch/reports/bodies/OneWeekNotifyCredBody.java
+++ b/auth/auth-batch/src/main/java/org/onap/aaf/auth/batch/reports/bodies/OneWeekNotifyCredBody.java
@@ -26,7 +26,7 @@ import org.onap.aaf.auth.batch.helpers.ExpireRange;
import org.onap.aaf.cadi.Access;
public class OneWeekNotifyCredBody extends NotifyCredBody {
- public OneWeekNotifyCredBody(Access access) throws IOException {
+ public OneWeekNotifyCredBody(Access access){
super(access, ExpireRange.ONE_WEEK);
}
diff --git a/auth/auth-cass/src/main/java/org/onap/aaf/auth/dao/Cacheable.java b/auth/auth-cass/src/main/java/org/onap/aaf/auth/dao/Cacheable.java
index 3632aa15..818ae148 100644
--- a/auth/auth-cass/src/main/java/org/onap/aaf/auth/dao/Cacheable.java
+++ b/auth/auth-cass/src/main/java/org/onap/aaf/auth/dao/Cacheable.java
@@ -3,6 +3,7 @@
* org.onap.aaf
* ===========================================================================
* Copyright (c) 2018 AT&T Intellectual Property. All rights reserved.
+ * Modifications 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.
@@ -29,6 +30,7 @@ package org.onap.aaf.auth.dao;
* @author Jonathan
*
*/
+@FunctionalInterface
public interface Cacheable {
public int[] invalidate(Cached<?,?> cache);
}
diff --git a/auth/auth-cass/src/main/java/org/onap/aaf/auth/dao/hl/Question.java b/auth/auth-cass/src/main/java/org/onap/aaf/auth/dao/hl/Question.java
index dddf3b51..1b20b900 100644
--- a/auth/auth-cass/src/main/java/org/onap/aaf/auth/dao/hl/Question.java
+++ b/auth/auth-cass/src/main/java/org/onap/aaf/auth/dao/hl/Question.java
@@ -496,7 +496,6 @@ public class Question {
Result<List<NsDAO.Data>> rld = nsDAO.read(trans, lookup);
if (rld.isOKhasData()) {
nsd=rld.value.get(0);
- lookup = nsd.parent;
if (type.type == nsd.type) {
return Result.ok(nsd);
} else {
diff --git a/cadi/core/src/main/java/org/onap/aaf/cadi/AES.java b/cadi/core/src/main/java/org/onap/aaf/cadi/AES.java
index c4f3d504..4ec51682 100644
--- a/cadi/core/src/main/java/org/onap/aaf/cadi/AES.java
+++ b/cadi/core/src/main/java/org/onap/aaf/cadi/AES.java
@@ -63,7 +63,7 @@ public class AES implements Encryption {
return kgen.generateKey();
}
- public AES(byte[] aeskey, int offset, int len) throws IOException, NoSuchAlgorithmException, NoSuchPaddingException {
+ public AES(byte[] aeskey, int offset, int len){
aeskeySpec = new SecretKeySpec(aeskey,offset,len,AES);
}