diff options
author | David Pursehouse <dpursehouse@collab.net> | 2019-07-17 09:31:03 +0900 |
---|---|---|
committer | David Pursehouse <dpursehouse@collab.net> | 2019-07-17 09:31:03 +0900 |
commit | a7e879782cdc761a225fae3e88698ca398014956 (patch) | |
tree | 4b35431cec0316f548049db1584f20329311fb23 | |
parent | e5554721bc57e56b44d3be80ec87054954c4a316 (diff) | |
parent | 0f6f21c916162f301c03898e14fc2954e9206783 (diff) |
Merge branch 'stable-2.16' into stable-3.0
* stable-2.16:
AccountCacheImpl: Don't return null on error but Optional.empty()
Change-Id: I94e746d9566780b6976d4d665d02946cb0a8c047
-rw-r--r-- | java/com/google/gerrit/server/account/AccountCacheImpl.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/java/com/google/gerrit/server/account/AccountCacheImpl.java b/java/com/google/gerrit/server/account/AccountCacheImpl.java index fd48fa7e67..acd7bd358a 100644 --- a/java/com/google/gerrit/server/account/AccountCacheImpl.java +++ b/java/com/google/gerrit/server/account/AccountCacheImpl.java @@ -101,7 +101,7 @@ public class AccountCacheImpl implements AccountCache { return byId.get(accountId); } catch (ExecutionException e) { logger.atWarning().withCause(e).log("Cannot load AccountState for ID %s", accountId); - return null; + return Optional.empty(); } } @@ -149,7 +149,7 @@ public class AccountCacheImpl implements AccountCache { .orElseGet(Optional::empty); } catch (IOException | ConfigInvalidException e) { logger.atWarning().withCause(e).log("Cannot load AccountState for username %s", username); - return null; + return Optional.empty(); } } |