Run automatic Java 8 conversion over codebase

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=171174380
This commit is contained in:
mcilwain 2017-10-05 10:48:38 -07:00 committed by Ben McIlwain
parent 44df5da771
commit 5edb7935ed
190 changed files with 2312 additions and 3096 deletions

View file

@ -17,7 +17,6 @@ package google.registry.monitoring.metrics;
import static com.google.common.truth.Truth.assertThat;
import static org.mockito.Mockito.mock;
import com.google.common.base.Supplier;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableMap;
import com.google.common.collect.ImmutableSet;
@ -76,12 +75,7 @@ public class MetricRegistryImplTest {
"test_description",
"test_valuedisplayname",
ImmutableSet.of(label),
new Supplier<ImmutableMap<ImmutableList<String>, Long>>() {
@Override
public ImmutableMap<ImmutableList<String>, Long> get() {
return ImmutableMap.of(ImmutableList.of("foo"), 1L);
}
},
() -> ImmutableMap.of(ImmutableList.of("foo"), 1L),
Long.class);
assertThat(testGauge.getValueClass()).isSameAs(Long.class);

View file

@ -22,7 +22,6 @@ import com.google.api.client.json.jackson2.JacksonFactory;
import com.google.api.services.monitoring.v3.Monitoring;
import com.google.api.services.monitoring.v3.MonitoringScopes;
import com.google.api.services.monitoring.v3.model.MonitoredResource;
import com.google.common.base.Supplier;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableMap;
import com.google.common.collect.ImmutableSet;
@ -130,12 +129,7 @@ public final class SheepCounterExample {
"Quality of the sleep.",
"Quality",
ImmutableSet.<LabelDescriptor>of(),
new Supplier<ImmutableMap<ImmutableList<String>, Double>>() {
@Override
public ImmutableMap<ImmutableList<String>, Double> get() {
return ImmutableMap.of(ImmutableList.<String>of(), new Random().nextDouble());
}
},
() -> ImmutableMap.of(ImmutableList.<String>of(), new Random().nextDouble()),
Double.class);
/**
@ -210,13 +204,10 @@ public final class SheepCounterExample {
Runtime.getRuntime()
.addShutdownHook(
new Thread(
new Runnable() {
@Override
public void run() {
reporter.stopAsync().awaitTerminated();
// Allow the LogManager to cleanup the loggers.
DelayedShutdownLogManager.resetFinally();
}
() -> {
reporter.stopAsync().awaitTerminated();
// Allow the LogManager to cleanup the loggers.
DelayedShutdownLogManager.resetFinally();
}));
System.err.println("Send SIGINT (Ctrl+C) to stop sleeping.");