Adding more execution parameters for experimental results (evaluation).
[pingpong.git] / Code / Projects / SmartPlugDetector / src / main / java / edu / uci / iotproject / util / PcapPacketUtils.java
index c205126..c46dc39 100644 (file)
@@ -372,7 +372,9 @@ public final class PcapPacketUtils {
                 // Print out packet lengths in a sequence
                 int packetCounter = 0;
                 for(PcapPacket pcapPacket : listPcapPacket) {
-                    System.out.print(pcapPacket.length());
+                    if(pcapPacket != null) {
+                        System.out.print(pcapPacket.length());
+                    }
                     if(packetCounter < listPcapPacket.size() - 1) {
                         System.out.print(" ");  // Provide space if not last packet
                     } else {