Merge "Add null check to getConfigForHostname"

This commit is contained in:
Chad Brubaker
2015-12-11 18:02:34 +00:00
committed by Gerrit Code Review

View File

@@ -68,7 +68,7 @@ public final class ApplicationConfig {
*/
public NetworkSecurityConfig getConfigForHostname(String hostname) {
ensureInitialized();
if (hostname.isEmpty() || mConfigs == null) {
if (hostname == null || hostname.isEmpty() || mConfigs == null) {
return mDefaultConfig;
}
if (hostname.charAt(0) == '.') {