Skip to content

Commit

Permalink
NonNull by default in runners/core/metrics
Browse files Browse the repository at this point in the history
  • Loading branch information
kennknowles committed Nov 8, 2017
1 parent a87b02a commit 34a46b1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
import java.util.HashMap;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import javax.annotation.Nullable;
import org.apache.beam.runners.core.construction.metrics.MetricFiltering;
import org.apache.beam.runners.core.construction.metrics.MetricKey;
import org.apache.beam.runners.core.metrics.MetricUpdates.MetricUpdate;
Expand Down Expand Up @@ -425,14 +426,14 @@ private static class AccumulatedMetricResult<T> implements MetricResult<T> {
private final MetricName name;
private final String step;
private final T attempted;
private final T committed;
private final @Nullable T committed;
private final boolean isCommittedSupported;

private AccumulatedMetricResult(
MetricName name,
String step,
T attempted,
T committed,
@Nullable T committed,
boolean isCommittedSupported) {
this.name = name;
this.step = step;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,8 @@
/**
* Utilities for runners to implement metrics.
*/
@DefaultAnnotation(NonNull.class)
package org.apache.beam.runners.core.metrics;

import edu.umd.cs.findbugs.annotations.DefaultAnnotation;
import edu.umd.cs.findbugs.annotations.NonNull;

0 comments on commit 34a46b1

Please sign in to comment.