summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJonathan Gathman <jonathan.gathman@att.com>2018-05-22 20:29:08 +0000
committerGerrit Code Review <gerrit@onap.org>2018-05-22 20:29:08 +0000
commit0f6134dbc812a220e2dca738b6cc2eee8d239cbd (patch)
treea6a80f280c39120f8c9888458a57fb4b2abc1538
parent1be676f478440ad014c4b6ba762a95cff4fbd19d (diff)
parentabf9c55ff200cf6dd5b9096e4b2f5ba250dfb721 (diff)
Merge "fixes in Future.java"
-rw-r--r--auth/auth-batch/src/main/java/org/onap/aaf/auth/helpers/Future.java21
1 files changed, 12 insertions, 9 deletions
diff --git a/auth/auth-batch/src/main/java/org/onap/aaf/auth/helpers/Future.java b/auth/auth-batch/src/main/java/org/onap/aaf/auth/helpers/Future.java
index a2dc6b65..948e65be 100644
--- a/auth/auth-batch/src/main/java/org/onap/aaf/auth/helpers/Future.java
+++ b/auth/auth-batch/src/main/java/org/onap/aaf/auth/helpers/Future.java
@@ -44,12 +44,12 @@ import com.datastax.driver.core.SimpleStatement;
import com.datastax.driver.core.Statement;
public class Future implements CacheChange.Data, Comparable<Future> {
- public static final Map<UUID,Future> data = new TreeMap<UUID,Future>();
- public static final Map<String,List<Future>> byRole = new TreeMap<String,List<Future>>();
+ public static final Map<UUID,Future> data = new TreeMap<>();
+ public static final Map<String,List<Future>> byRole = new TreeMap<>();
public final FutureDAO.Data fdd;
public final String role; // derived
- private final static CacheChange<Future> cache = new CacheChange<Future>();
+ private static final CacheChange<Future> cache = new CacheChange<>();
public final UUID id() {
@@ -102,13 +102,16 @@ public class Future implements CacheChange.Data, Comparable<Future> {
++count;
Future f = creator.create(row);
data.put(f.fdd.id,f);
- if(f.role!=null) {
- List<Future> lf = byRole.get(f.role);
- if(lf==null) {
- byRole.put(f.role,lf = new ArrayList<Future>());
- }
- lf.add(f);
+ if(f.role==null) {
+ continue;
}
+ List<Future> lf = byRole.get(f.role);
+ if(lf==null) {
+ lf = new ArrayList<>();
+ byRole.put(f.role,lf);
+ }
+ lf.add(f);
+
}
} finally {
tt.done();