mirror of
https://github.com/google/nomulus.git
synced 2025-05-13 07:57:13 +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
|
@ -23,11 +23,9 @@ import static java.nio.charset.StandardCharsets.US_ASCII;
|
|||
|
||||
import com.beust.jcommander.Parameter;
|
||||
import com.beust.jcommander.Parameters;
|
||||
import com.google.common.base.Function;
|
||||
import com.google.common.collect.ImmutableList;
|
||||
import com.google.common.collect.ImmutableMap;
|
||||
import google.registry.model.domain.DomainResource;
|
||||
import google.registry.model.domain.secdns.DelegationSignerData;
|
||||
import google.registry.model.host.HostResource;
|
||||
import google.registry.tools.Command.RemoteApiCommand;
|
||||
import google.registry.tools.params.PathParameter;
|
||||
|
@ -104,16 +102,12 @@ final class GenerateDnsReportCommand implements RemoteApiCommand {
|
|||
.getDsData()
|
||||
.stream()
|
||||
.map(
|
||||
new Function<DelegationSignerData, Map<String, ?>>() {
|
||||
@Override
|
||||
public Map<String, ?> apply(DelegationSignerData dsData) {
|
||||
return ImmutableMap.of(
|
||||
"keyTag", dsData.getKeyTag(),
|
||||
"algorithm", dsData.getAlgorithm(),
|
||||
"digestType", dsData.getDigestType(),
|
||||
"digest", base16().encode(dsData.getDigest()));
|
||||
}
|
||||
})
|
||||
dsData1 ->
|
||||
ImmutableMap.of(
|
||||
"keyTag", dsData1.getKeyTag(),
|
||||
"algorithm", dsData1.getAlgorithm(),
|
||||
"digestType", dsData1.getDigestType(),
|
||||
"digest", base16().encode(dsData1.getDigest())))
|
||||
.collect(toImmutableList());
|
||||
ImmutableMap.Builder<String, Object> mapBuilder = new ImmutableMap.Builder<>();
|
||||
mapBuilder.put("domain", domain.getFullyQualifiedDomainName());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue