CMService.java-Merge if statement 53/97353/1
authorThugutla sailakshmi <tsaila10@in.ibm.com>
Mon, 21 Oct 2019 07:50:54 +0000 (13:20 +0530)
committerThugutla sailakshmi <tsaila10@in.ibm.com>
Mon, 21 Oct 2019 07:51:05 +0000 (13:21 +0530)
Issue-ID: AAF-876
Change-Id: If05842f2a727e4f4f756ee782252e9722178fcfd
Signed-off-by: Thugutla sailakshmi <tsaila10@in.ibm.com>
auth/auth-certman/src/main/java/org/onap/aaf/auth/cm/service/CMService.java

index 8810943..6732503 100644 (file)
@@ -366,11 +366,9 @@ public class CMService {
                             Collection<? extends Certificate> certs = Factory.toX509Certificate(cdd.x509);
                             for(Iterator<? extends Certificate> iter = certs.iterator(); iter.hasNext();) {
                                 X509Certificate x509 = (X509Certificate)iter.next();
-                                if(x509.getNotAfter().after(now) && x509.getSubjectDN().getName().contains(cn)) {
-                                    if(++count>max_509s) {
+                                if((x509.getNotAfter().after(now) && x509.getSubjectDN().getName().contains(cn))&&(++count>max_509s)) {
                                         break;
-                                    }
-                                }
+                                     }
                             }
                         }
                         if(count>max_509s) {