Merge "Add null check to getConfigForHostname"
am: fe1eac7a19
* commit 'fe1eac7a19b827af71c503df6aefc59076a30928':
Add null check to getConfigForHostname
This commit is contained in:
@@ -68,7 +68,7 @@ public final class ApplicationConfig {
|
|||||||
*/
|
*/
|
||||||
public NetworkSecurityConfig getConfigForHostname(String hostname) {
|
public NetworkSecurityConfig getConfigForHostname(String hostname) {
|
||||||
ensureInitialized();
|
ensureInitialized();
|
||||||
if (hostname.isEmpty() || mConfigs == null) {
|
if (hostname == null || hostname.isEmpty() || mConfigs == null) {
|
||||||
return mDefaultConfig;
|
return mDefaultConfig;
|
||||||
}
|
}
|
||||||
if (hostname.charAt(0) == '.') {
|
if (hostname.charAt(0) == '.') {
|
||||||
|
|||||||
Reference in New Issue
Block a user