Revert "Fixing errorprone's warning."
This reverts commit c5836479cf04a23bc24f097ea606153b572eb76b.
Change-Id: Ia662d4b35a7d063b45876315d8bf97444ca41c5b
diff --git a/utils/misc/src/main/java/org/onlab/packet/ICMPEcho.java b/utils/misc/src/main/java/org/onlab/packet/ICMPEcho.java
index ff0a76a..aa06cc6 100644
--- a/utils/misc/src/main/java/org/onlab/packet/ICMPEcho.java
+++ b/utils/misc/src/main/java/org/onlab/packet/ICMPEcho.java
@@ -19,6 +19,7 @@
import static org.onlab.packet.PacketUtils.checkInput;
import static com.google.common.base.MoreObjects.toStringHelper;
+import static com.google.common.base.Preconditions.checkNotNull;
/**
* ICMP packet class for echo purpose.
@@ -76,6 +77,9 @@
*/
@Override
public byte[] serialize() {
+ checkNotNull(this.identifier);
+ checkNotNull(this.sequenceNum);
+
int length = ICMP_ECHO_HEADER_LENGTH;
byte[] payloadData = null;
if (this.payload != null) {