Mapper1_0.java-merge the if statement with existing one 84/95884/1
authorThugutla sailakshmi <tsaila10@in.ibm.com>
Wed, 18 Sep 2019 04:57:21 +0000 (10:27 +0530)
committerThugutla sailakshmi <tsaila10@in.ibm.com>
Wed, 18 Sep 2019 04:57:42 +0000 (10:27 +0530)
Mapper1_0.java-merge the if statement with existing one

Issue-ID: AAF-876
Change-Id: I1d50c3337ec2d42e0b8ded17e0cd47e70665b4e6
Signed-off-by: Thugutla sailakshmi <tsaila10@in.ibm.com>
auth/auth-certman/src/main/java/org/onap/aaf/auth/cm/mapper/Mapper1_0.java

index 1c95196..bce7ecc 100644 (file)
@@ -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.
@@ -123,11 +124,9 @@ public class Mapper1_0 implements Mapper<BaseRequest,CertInfo,Artifacts,Error> {
         // Certs in keystore versus Truststore.  Separate in Version 2_0
         if (cin.trustCAs()!=null) {
             for (String c : cin.trustCAs()) {
-                if (c!=null) {
-                    if (!cout.getCerts().contains(c)) {
-                        cout.getCerts().add(c);
-                    }
-                }
+                if ((c!=null)&&(!cout.getCerts().contains(c))) {
+                     cout.getCerts().add(c);
+                 }
             }
         }
         if (cin.notes()!=null) {