Skip to content

Commit

Permalink
fix(jans-link): fix null pointer exception for sourceConfig #5709 (#5710
Browse files Browse the repository at this point in the history
)

Signed-off-by: Mustafa Baser <mbaser@mail.com>
  • Loading branch information
shekhar16 authored and devrimyatar committed Dec 30, 2023
1 parent dd7b07a commit f1418e5
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,11 @@ private boolean isStartCacheRefresh(AppConfiguration currentConfiguration) {
return false;
}

if(null == currentConfiguration.getSourceConfigs()){
log.info("Source Config is null, nothing to load ");
return false;
}

String cacheRefreshServerIpAddress = currentConfiguration.getServerIpAddress();
// if (StringHelper.isEmpty(cacheRefreshServerIpAddress)) {
// log.debug("There is no master Cache Refresh server");
Expand Down Expand Up @@ -1135,6 +1140,10 @@ private Map<CacheCompoundKey, GluuSimplePerson> getSourcePersonCompoundKeyMap(

private LdapServerConnection[] prepareLdapServerConnections(CacheRefreshConfiguration cacheRefreshConfiguration,
List<GluuLdapConfiguration> ldapConfigurations) {
if(null == ldapConfigurations ){
return null;
}

LdapServerConnection[] ldapServerConnections = new LdapServerConnection[ldapConfigurations.size()];
for (int i = 0; i < ldapConfigurations.size(); i++) {
ldapServerConnections[i] = prepareLdapServerConnection(cacheRefreshConfiguration,
Expand Down

0 comments on commit f1418e5

Please sign in to comment.