mirror of
https://github.com/google/nomulus.git
synced 2025-06-27 06:44:51 +02:00
Always use the constructor to make Immutable Collection Builders
------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=135359669
This commit is contained in:
parent
79387f5d1e
commit
b65b855067
16 changed files with 29 additions and 32 deletions
|
@ -79,7 +79,7 @@ public final class VirtualMetric<V> extends AbstractMetric<V> {
|
|||
ImmutableList<MetricPoint<V>> getTimestampedValues(Instant timestamp) {
|
||||
ImmutableMap<ImmutableList<String>, V> values = valuesSupplier.get();
|
||||
|
||||
ImmutableList.Builder<MetricPoint<V>> metricPoints = ImmutableList.builder();
|
||||
ImmutableList.Builder<MetricPoint<V>> metricPoints = new ImmutableList.Builder<>();
|
||||
for (Entry<ImmutableList<String>, V> entry : values.entrySet()) {
|
||||
metricPoints.add(
|
||||
MetricPoint.create(this, entry.getKey(), timestamp, timestamp, entry.getValue()));
|
||||
|
|
|
@ -79,7 +79,7 @@ public abstract class EppMetric implements BigQueryMetric {
|
|||
public ImmutableMap<String, String> getBigQueryRowEncoding() {
|
||||
// Create map builder, start with required values
|
||||
ImmutableMap.Builder<String, String> map =
|
||||
ImmutableMap.<String, String>builder()
|
||||
new ImmutableMap.Builder<String, String>()
|
||||
.put("requestId", getRequestId())
|
||||
.put("startTime", toBigqueryTimestamp(getStartTimestamp()))
|
||||
.put("endTime", toBigqueryTimestamp(getEndTimestamp()))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue