package org.eclipse.tracecompass.internal.tmf.pcap.core.event;
+import static org.eclipse.tracecompass.common.core.NonNullUtils.checkNotNull;
+
import java.nio.ByteBuffer;
import java.util.Collection;
import java.util.Collections;
-import java.util.List;
import java.util.Map;
-import org.eclipse.jdt.annotation.NonNull;
import org.eclipse.jdt.annotation.Nullable;
import org.eclipse.tracecompass.internal.pcap.core.packet.Packet;
import org.eclipse.tracecompass.internal.pcap.core.protocol.PcapProtocol;
}
if (packet == null) {
- @SuppressWarnings("null")
- @NonNull List<TmfPcapProtocol> emptyList = Collections.EMPTY_LIST;
- fProtocols = emptyList;
+ fProtocols = checkNotNull(Collections.EMPTY_LIST);
return fProtocols;
}
// Go through all the packets and add them to list.
}
}
- @SuppressWarnings("null")
- @NonNull ImmutableList<TmfPcapProtocol> immutableList = builder.build();
- fProtocols = immutableList;
- return immutableList;
+ fProtocols = checkNotNull(builder.build());
+ return fProtocols;
}
/**