Skip to content

Commit acdfde9

Browse files
committed
Minor tweaks
1 parent 46d50b0 commit acdfde9

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

flink-runtime/src/main/java/org/apache/flink/runtime/rest/messages/job/metrics/MetricCollectionResponseBody.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@
2525
import java.util.ArrayList;
2626
import java.util.Collection;
2727

28+
import static java.util.Objects.requireNonNull;
29+
2830
/**
2931
* Response type for a collection of metrics.
3032
*
@@ -37,11 +39,14 @@
3739
* }</pre>
3840
*/
3941
public final class MetricCollectionResponseBody extends ArrayList<Metric> implements ResponseBody {
42+
43+
private static final long serialVersionUID = -1170348873871206965L;
44+
4045
// a default constructor is required for collection type marshaling
4146
public MetricCollectionResponseBody() {}
4247

4348
public MetricCollectionResponseBody(Collection<Metric> metrics) {
44-
super(metrics);
49+
super(requireNonNull(metrics, "metrics must not be null"));
4550
}
4651

4752
@JsonIgnore

0 commit comments

Comments
 (0)