From: Thugutla sailakshmi Date: Thu, 5 Sep 2019 09:29:04 +0000 (+0530) Subject: major-Extract the assignment out of this expression X-Git-Tag: 2.1.17~148^2 X-Git-Url: https://gerrit.onap.org/r/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F16%2F95016%2F1;p=aaf%2Fauthz.git major-Extract the assignment out of this expression Extract the assignment out of this expression Issue-ID: AAF-876 Change-Id: I112c451303b11b2c0afd13b23b4c2530abf0a7d1 Signed-off-by: Thugutla sailakshmi --- diff --git a/auth/auth-batch/src/main/java/org/onap/aaf/auth/batch/helpers/Cred.java b/auth/auth-batch/src/main/java/org/onap/aaf/auth/batch/helpers/Cred.java index 83638cc7..14d65d4c 100644 --- a/auth/auth-batch/src/main/java/org/onap/aaf/auth/batch/helpers/Cred.java +++ b/auth/auth-batch/src/main/java/org/onap/aaf/auth/batch/helpers/Cred.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. @@ -203,9 +204,10 @@ public class Cred { } cred.instances.add(new Instance(type, timestamp, other, written/1000,tag)); - List lscd = byNS.get(cred.ns); + List lscd = byNS.get(cred.ns); if (lscd==null) { - byNS.put(cred.ns, (lscd=new ArrayList<>())); + lscd=new ArrayList<>(); + byNS.put(cred.ns,lscd); } boolean found = false; for (Cred c : lscd) {