Adding null pointer handling in cluster analysis.
authorrtrimana <rtrimana@uci.edu>
Wed, 10 Apr 2019 22:47:32 +0000 (15:47 -0700)
committerrtrimana <rtrimana@uci.edu>
Wed, 10 Apr 2019 22:47:32 +0000 (15:47 -0700)
Code/Projects/PacketLevelSignatureExtractor/src/main/java/edu/uci/iotproject/util/PcapPacketUtils.java

index c1a1a25..ba06070 100644 (file)
@@ -633,6 +633,9 @@ public final class PcapPacketUtils {
             List<PcapPacket> listCorePointLowerBound = listOfListPcapPacket.get(0);
             List<PcapPacket> listCorePointUpperBound = listOfListPcapPacket.get(1);
             for(PcapPacket corePointLowerBound : listCorePointLowerBound) {
+                if (corePointLowerBound == null) { // Skip if null!
+                    continue;
+                }
                 PcapPacket corePointUpperBound =
                         listCorePointUpperBound.get(listCorePointLowerBound.indexOf(corePointLowerBound));
                 // Return if the match for the core point bounds is found