From 9128eb75b403f341b1c16ee738b9a1743088f9e3 Mon Sep 17 00:00:00 2001 From: Instrumental Date: Tue, 3 Jul 2018 17:22:46 -0500 Subject: From IAN, fix NPE (accidentally abandoned) Issue-ID: AAF-384 Change-Id: I3ebd2de938075662e35ed767463bf251b3ee97f3 Signed-off-by: Instrumental --- .../src/main/java/org/onap/aaf/auth/update/Expiring.java | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'auth') diff --git a/auth/auth-batch/src/main/java/org/onap/aaf/auth/update/Expiring.java b/auth/auth-batch/src/main/java/org/onap/aaf/auth/update/Expiring.java index df631fe3..f3388326 100644 --- a/auth/auth-batch/src/main/java/org/onap/aaf/auth/update/Expiring.java +++ b/auth/auth-batch/src/main/java/org/onap/aaf/auth/update/Expiring.java @@ -181,13 +181,16 @@ public class Expiring extends Batch { if(ur.expires().after(future)) { // no need for Approval anymore a.delayDelete(noAvg, apprDAO, dryRun, "User Role already Extended"); UUID tkt = a.getTicket(); - if(tkt!=null) { - f = Future.data.get(tkt); + if(tkt!=null && Future.data.containsKey(tkt)) { + f = Future.data.get(a.getTicket()); } } } else { a.delayDelete(noAvg, apprDAO, dryRun, "User Role does not exist"); - f = Future.data.get(a.getTicket()); + UUID tkt = a.getTicket(); + if(tkt !=null && Future.data.containsKey(tkt)) { + f = Future.data.get(a.getTicket()); + } } if(f!=null) { f.delayedDelete(noAvg, futureDAO, dryRun, "Approvals removed"); -- cgit 1.2.3-korg