mirror of
https://github.com/google/nomulus.git
synced 2025-07-25 12:08:36 +02:00
Refactor Guava functional methods to use lambdas
------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=177027488
This commit is contained in:
parent
2ae496bfce
commit
bbe2584da4
47 changed files with 478 additions and 647 deletions
|
@ -26,7 +26,6 @@ import com.google.common.annotations.VisibleForTesting;
|
|||
import com.google.common.base.Supplier;
|
||||
import com.google.common.collect.ImmutableMap;
|
||||
import com.googlecode.objectify.Key;
|
||||
import com.googlecode.objectify.Work;
|
||||
import com.googlecode.objectify.annotation.EmbedMap;
|
||||
import com.googlecode.objectify.annotation.Entity;
|
||||
import com.googlecode.objectify.annotation.Id;
|
||||
|
@ -112,15 +111,12 @@ public class ClaimsListShard extends ImmutableObject {
|
|||
(final Key<ClaimsListShard> key) ->
|
||||
ofy()
|
||||
.transactNewReadOnly(
|
||||
new Work<ClaimsListShard>() {
|
||||
@Override
|
||||
public ClaimsListShard run() {
|
||||
ClaimsListShard claimsListShard = ofy().load().key(key).now();
|
||||
checkState(
|
||||
claimsListShard != null,
|
||||
"Key not found when loading claims list shards.");
|
||||
return claimsListShard;
|
||||
}
|
||||
() -> {
|
||||
ClaimsListShard claimsListShard = ofy().load().key(key).now();
|
||||
checkState(
|
||||
claimsListShard != null,
|
||||
"Key not found when loading claims list shards.");
|
||||
return claimsListShard;
|
||||
}));
|
||||
|
||||
// Combine the shards together and return the concatenated ClaimsList.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue