Toru Furusawa
Committed by Yuta HIGUCHI

[ONOS-3717] Add checkNotNull for the parameters of the constructors of OchPort, …

…OduCltPort and OmsPort.

Change-Id: I48a5735b3b421d7bbcd91e318ae7bb090d914cbc
......@@ -45,7 +45,7 @@ public class OchPort extends DefaultPort {
public OchPort(Element element, PortNumber number, boolean isEnabled, OduSignalType signalType,
boolean isTunable, OchSignal lambda, Annotations... annotations) {
super(element, number, isEnabled, Type.OCH, 0, annotations);
this.signalType = signalType;
this.signalType = checkNotNull(signalType);
this.isTunable = isTunable;
this.lambda = checkNotNull(lambda);
}
......
......@@ -18,6 +18,7 @@ package org.onosproject.net;
import java.util.Objects;
import static com.google.common.base.MoreObjects.toStringHelper;
import static com.google.common.base.Preconditions.checkNotNull;
/**
* Implementation of ODU client port (Optical channel Data Unit).
......@@ -49,7 +50,7 @@ public class OduCltPort extends DefaultPort {
public OduCltPort(Element element, PortNumber number, boolean isEnabled,
SignalType signalType, Annotations... annotations) {
super(element, number, isEnabled, Type.ODUCLT, 0, annotations);
this.signalType = signalType;
this.signalType = checkNotNull(signalType);
}
/**
......
......@@ -20,6 +20,7 @@ import org.onlab.util.Frequency;
import java.util.Objects;
import static com.google.common.base.MoreObjects.toStringHelper;
import static com.google.common.base.Preconditions.checkNotNull;
/**
* Implementation of OMS port (Optical Multiplexing Section).
......@@ -49,9 +50,9 @@ public class OmsPort extends DefaultPort {
public OmsPort(Element element, PortNumber number, boolean isEnabled,
Frequency minFrequency, Frequency maxFrequency, Frequency grid, Annotations... annotations) {
super(element, number, isEnabled, Type.OMS, 0, annotations);
this.minFrequency = minFrequency;
this.maxFrequency = maxFrequency;
this.grid = grid;
this.minFrequency = checkNotNull(minFrequency);
this.maxFrequency = checkNotNull(maxFrequency);
this.grid = checkNotNull(grid);
}
/**
......