commit | 7a4ec6ad4d7e9743dbe3059cf0facc419f54256d | [log] [tgz] |
---|---|---|
author | Chih-Hung Hsieh <chh@google.com> | Wed May 16 18:47:43 2018 -0700 |
committer | Chih-Hung Hsieh <chh@google.com> | Thu May 17 10:15:23 2018 -0700 |
tree | 679bf49564f8182f52292eea2934742f7c52e43d | |
parent | 99b44dbb1a7a91c55440bbb4dcad4b8753cbf965 [diff] |
Allow one email to have multiple accounts. * emails.getAccountsFor could return multiple accounts for one email, including inactive accounts. Change-Id: I48a5e7b876b553d29020435e2e1830ecf26b2c9f
diff --git a/src/main/java/com/googlesource/gerrit/plugins/findowners/OwnersValidator.java b/src/main/java/com/googlesource/gerrit/plugins/findowners/OwnersValidator.java index 1d27c47..866a2e7 100644 --- a/src/main/java/com/googlesource/gerrit/plugins/findowners/OwnersValidator.java +++ b/src/main/java/com/googlesource/gerrit/plugins/findowners/OwnersValidator.java
@@ -195,7 +195,7 @@ if (!wrongEmail) { try { Collection<Account.Id> ids = email2ids.get(owner); - wrongEmail = (ids == null || ids.size() != 1); + wrongEmail = (ids == null || ids.isEmpty()); } catch (Exception e) { wrongEmail = true; }