mirror of
https://github.com/google/nomulus.git
synced 2025-07-20 01:35:59 +02:00
Remove unnecessary generic type arguments
------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=175155365
This commit is contained in:
parent
8dcc2d6833
commit
2aa897e698
140 changed files with 355 additions and 465 deletions
|
@ -29,7 +29,7 @@ final class MetricMetrics {
|
|||
"/metrics/push_intervals",
|
||||
"Count of push intervals.",
|
||||
"Push Intervals",
|
||||
ImmutableSet.<LabelDescriptor>of());
|
||||
ImmutableSet.of());
|
||||
private static final ImmutableSet<LabelDescriptor> LABELS =
|
||||
ImmutableSet.of(
|
||||
LabelDescriptor.create("kind", "Metric Kind"),
|
||||
|
|
|
@ -117,7 +117,7 @@ public class MetricReporter extends AbstractScheduledService {
|
|||
runOneIteration();
|
||||
|
||||
// Offer a poision pill to inform the exporter to stop.
|
||||
writeQueue.offer(Optional.<ImmutableList<MetricPoint<?>>>empty());
|
||||
writeQueue.offer(Optional.empty());
|
||||
try {
|
||||
metricExporter.awaitTerminated(10, TimeUnit.SECONDS);
|
||||
logger.info("Shut down MetricExporter");
|
||||
|
|
|
@ -382,7 +382,7 @@ public class StackdriverWriter implements MetricWriter {
|
|||
|
||||
List<LabelDescriptor> encodedLabels = descriptor.getLabels();
|
||||
// The MetricDescriptors returned by the GCM API have null fields rather than empty lists
|
||||
encodedLabels = encodedLabels == null ? ImmutableList.<LabelDescriptor>of() : encodedLabels;
|
||||
encodedLabels = encodedLabels == null ? ImmutableList.of() : encodedLabels;
|
||||
|
||||
ImmutableMap.Builder<String, String> labelValues = new ImmutableMap.Builder<>();
|
||||
int i = 0;
|
||||
|
|
|
@ -178,7 +178,7 @@ public abstract class EppMetric implements BigQueryMetric {
|
|||
public Builder setTlds(ImmutableSet<String> tlds) {
|
||||
switch (tlds.size()) {
|
||||
case 0:
|
||||
setTld(Optional.<String>empty());
|
||||
setTld(Optional.empty());
|
||||
break;
|
||||
case 1:
|
||||
String tld = Iterables.getOnlyElement(tlds);
|
||||
|
|
|
@ -67,7 +67,7 @@ public class MetricsExportAction implements Runnable {
|
|||
// Filter out the special parameters that the Action is called with. Everything that's left
|
||||
// is returned in a Map that is suitable to pass to Bigquery as row data.
|
||||
Map<String, Object> jsonRows =
|
||||
ImmutableMap.<String, Object>copyOf(
|
||||
ImmutableMap.copyOf(
|
||||
filterKeys(parameters, not(in(SPECIAL_PARAMS))).entries());
|
||||
TableDataInsertAllResponse response = bigquery.tabledata()
|
||||
.insertAll(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue