From 28a45e41fc0a699b8213c4c508dea08e0aac46f7 Mon Sep 17 00:00:00 2001 From: manisha07 Date: Thu, 7 Nov 2019 13:48:58 +0530 Subject: merge if statement with enclsoing one Issue-ID: AAF-1031 Change-Id: I12c3ae316342d3dc5d1245dba6d86a7124b7fb0c Signed-off-by: manisha07 --- .../src/main/java/org/onap/aaf/auth/org/OrganizationFactory.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'auth') diff --git a/auth/auth-core/src/main/java/org/onap/aaf/auth/org/OrganizationFactory.java b/auth/auth-core/src/main/java/org/onap/aaf/auth/org/OrganizationFactory.java index 867d2984..6d559de5 100644 --- a/auth/auth-core/src/main/java/org/onap/aaf/auth/org/OrganizationFactory.java +++ b/auth/auth-core/src/main/java/org/onap/aaf/auth/org/OrganizationFactory.java @@ -131,13 +131,13 @@ public class OrganizationFactory { } env.init().printf("Instantiated %s with %s%s",orgNS,orgClass,(isDefault?" as default":"")); } - if (org==null) { - if (defaultOrg!=null) { + if ( (org==null) && (defaultOrg!=null)){ + org=defaultOrg; orgs.put(orgNS, org); } } - } + return org; } -- cgit 1.2.3-korg