summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJonathan Gathman <jonathan.gathman@att.com>2019-01-30 12:05:42 +0000
committerGerrit Code Review <gerrit@onap.org>2019-01-30 12:05:42 +0000
commita95fc2d8cddfda9e3ab4821a41077c0428b9b014 (patch)
tree232dec7b225baa48c86fff4582601c266877a332
parent06c5c6ab8124330a8fdb4d662bc655769ff23e53 (diff)
parent2ade740bd3e74e699de71afe2f085ecafd3d37a2 (diff)
Merge "Sonar Fixes - ActionPuntDAO and subclasses"
-rw-r--r--auth/auth-batch/src/main/java/org/onap/aaf/auth/batch/actions/ActionPuntDAO.java16
-rw-r--r--auth/auth-batch/src/main/java/org/onap/aaf/auth/batch/actions/CredPunt.java4
-rw-r--r--auth/auth-batch/src/main/java/org/onap/aaf/auth/batch/actions/URPunt.java4
3 files changed, 6 insertions, 18 deletions
diff --git a/auth/auth-batch/src/main/java/org/onap/aaf/auth/batch/actions/ActionPuntDAO.java b/auth/auth-batch/src/main/java/org/onap/aaf/auth/batch/actions/ActionPuntDAO.java
index 37abbaf4..5d060758 100644
--- a/auth/auth-batch/src/main/java/org/onap/aaf/auth/batch/actions/ActionPuntDAO.java
+++ b/auth/auth-batch/src/main/java/org/onap/aaf/auth/batch/actions/ActionPuntDAO.java
@@ -34,12 +34,12 @@ public abstract class ActionPuntDAO<D, RV, T> extends ActionDAO<D, RV, T> {
private int months;
protected static final Date now = new Date();
- public ActionPuntDAO(AuthzTrans trans, Cluster cluster, int months, int range, boolean dryRun) throws APIException, IOException {
+ public ActionPuntDAO(AuthzTrans trans, Cluster cluster, int months, boolean dryRun) throws APIException, IOException {
super(trans, cluster,dryRun);
this.months = months;
}
- public ActionPuntDAO(AuthzTrans trans, ActionDAO<?, ?,?> predecessor, int months, int range) {
+ public ActionPuntDAO(AuthzTrans trans, ActionDAO<?, ?, ?> predecessor, int months) {
super(trans, predecessor);
this.months = months;
}
@@ -49,18 +49,6 @@ public abstract class ActionPuntDAO<D, RV, T> extends ActionDAO<D, RV, T> {
GregorianCalendar temp = new GregorianCalendar();
temp.setTime(current);
temp.add(GregorianCalendar.MONTH, months);
-
- /*
- * This method Randomized date. This is no longer needed. Just add the Punt Months.
- temp.add(GregorianCalendar.MONTH, months);
- if (range>0) {
- int forward = Math.abs(random.nextInt()%range);
- if (forward>1) {
- temp.add(GregorianCalendar.MONTH, forward);
- temp.add(GregorianCalendar.DAY_OF_MONTH, (random.nextInt()%30)-15);
- }
- }
- */
return temp.getTime();
}
diff --git a/auth/auth-batch/src/main/java/org/onap/aaf/auth/batch/actions/CredPunt.java b/auth/auth-batch/src/main/java/org/onap/aaf/auth/batch/actions/CredPunt.java
index ef6bb94e..8c3188d1 100644
--- a/auth/auth-batch/src/main/java/org/onap/aaf/auth/batch/actions/CredPunt.java
+++ b/auth/auth-batch/src/main/java/org/onap/aaf/auth/batch/actions/CredPunt.java
@@ -36,11 +36,11 @@ import com.datastax.driver.core.Cluster;
public class CredPunt extends ActionPuntDAO<CredDAO.Data,Void,String> {
public CredPunt(AuthzTrans trans, Cluster cluster, int months, int range, boolean dryRun) throws IOException, APIException {
- super(trans,cluster,months,range,dryRun);
+ super(trans,cluster,months, dryRun);
}
public CredPunt(AuthzTrans trans, ActionDAO<?,?,?> adao, int months, int range) throws IOException {
- super(trans, adao, months,range);
+ super(trans, adao, months);
}
public Result<Void> exec(AuthzTrans trans, CredDAO.Data cdd,String text) {
diff --git a/auth/auth-batch/src/main/java/org/onap/aaf/auth/batch/actions/URPunt.java b/auth/auth-batch/src/main/java/org/onap/aaf/auth/batch/actions/URPunt.java
index 18705fb8..28c7a641 100644
--- a/auth/auth-batch/src/main/java/org/onap/aaf/auth/batch/actions/URPunt.java
+++ b/auth/auth-batch/src/main/java/org/onap/aaf/auth/batch/actions/URPunt.java
@@ -37,11 +37,11 @@ import com.datastax.driver.core.Cluster;
public class URPunt extends ActionPuntDAO<UserRole,Void,String> {
public URPunt(AuthzTrans trans, Cluster cluster, int months, int range, boolean dryRun) throws APIException, IOException {
- super(trans,cluster, months, range,dryRun);
+ super(trans,cluster, months, dryRun);
}
public URPunt(AuthzTrans trans, ActionDAO<?,?,?> adao, int months, int range) {
- super(trans, adao, months, range);
+ super(trans, adao, months);
}
public Result<Void> exec(AuthzTrans trans, UserRole ur, String text) {