summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDriptaroop Das <driptaroop.das@in.ibm.com>2019-01-24 16:36:09 +0530
committerDriptaroop Das <driptaroop.das@in.ibm.com>2019-01-24 16:36:19 +0530
commit2ade740bd3e74e699de71afe2f085ecafd3d37a2 (patch)
tree497abe6f0d055b0954b21b6262ad4ffa5088cad7
parent749bff255e3d7fd29d8cebaeb83eface0e587e19 (diff)
Sonar Fixes - ActionPuntDAO and subclasses
Sonar Fixes - ActionPuntDAO and subclasses Issue-ID: AAF-730 Change-Id: I43123a886a390620ebd608bad49828596aac1b1d Signed-off-by: Driptaroop Das <driptaroop.das@in.ibm.com>
-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) {