Skip to content

Commit

Permalink
Avoid null pointer exceptions
Browse files Browse the repository at this point in the history
  • Loading branch information
Jose Antonio Sanchez committed Apr 24, 2018
1 parent 782b1cb commit 77a8653
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -129,8 +129,10 @@ public static <T> T createClient(String baseUrl, Class<T> clientClass, String ta
public static <T> T createClient(String baseUrl, Class<T> clientClass, SecurityConfiguration securityConfiguration)
throws SecurityHandlerException {

return createClient(baseUrl, clientClass, securityConfiguration.getClientId(),
securityConfiguration.getPlatformId(), createSecurityHandler(securityConfiguration));
String clientId = (securityConfiguration != null) ? securityConfiguration.getClientId() : null;
String platformId = (securityConfiguration != null) ? securityConfiguration.getPlatformId() : null;

return createClient(baseUrl, clientClass, clientId, platformId, createSecurityHandler(securityConfiguration));
}

public static IComponentSecurityHandler createSecurityHandler(SecurityConfiguration securityConfiguration)
Expand Down

0 comments on commit 77a8653

Please sign in to comment.