commit | fc96372c792b4d61838f6ccc403f1d434c1d2b02 | [log] [tgz] |
---|---|---|
author | Orgad Shaneh <orgads@gmail.com> | Tue Nov 22 14:41:27 2016 +0200 |
committer | Orgad Shaneh <orgads@gmail.com> | Tue Nov 22 14:41:27 2016 +0200 |
tree | bd68f11038e1019e6b12fb9445e0eb736376e4b0 | |
parent | 9b3e5c68b8e396a55589e2278ddb9bb72f2fa63f [diff] |
Add null protection Change-Id: I53d0b4e1154f2ddad84b09e623bd0251539608aa
diff --git a/src/main/java/com/googlesource/gerrit/plugins/avatars/external/ExternalUrlAvatarProvider.java b/src/main/java/com/googlesource/gerrit/plugins/avatars/external/ExternalUrlAvatarProvider.java index ca5444f..056a1f2 100644 --- a/src/main/java/com/googlesource/gerrit/plugins/avatars/external/ExternalUrlAvatarProvider.java +++ b/src/main/java/com/googlesource/gerrit/plugins/avatars/external/ExternalUrlAvatarProvider.java
@@ -114,7 +114,7 @@ */ private String replaceInUrl(String placeholder, String url, String replacement) { - if (!url.contains(placeholder)) { + if (url == null || !url.contains(placeholder)) { return url; }