Fix possible NPE in IdentityApplicationManagementUtil
@@ -564,11 +564,13 @@ public class IdentityApplicationManagementUtil {
public static FederatedAuthenticatorConfig getFederatedAuthenticator(
FederatedAuthenticatorConfig[] federatedAuthenticators, String authenticatorName) {
+ if (ArrayUtils.isNotEmpty(federatedAuthenticators)) {
for (FederatedAuthenticatorConfig authenticator : federatedAuthenticators) {
- if (authenticator.getName().equals(authenticatorName)) {
+ if (authenticator != null && authenticator.getName().equals(authenticatorName)) {
return authenticator;
}
}
+ }
return null;
}
