import java.nio.MappedByteBuffer;
import java.nio.channels.FileChannel.MapMode;
import java.util.Collection;
-import java.util.HashMap;
+import java.util.Map;
import org.eclipse.linuxtools.ctf.core.event.EventDefinition;
import org.eclipse.linuxtools.ctf.core.event.IEventDeclaration;
private final StructDefinition streamEventContextDef;
/** Maps event ID to event definitions. */
- private final HashMap<Long, EventDefinition> events;
+ private final Map<Long, EventDefinition> events;
/** Reference to the index entry of the current packet. */
private StreamInputPacketIndexEntry currentPacket = null;
} // else, eventID remains 0
/* Get the timestamp from the event header (may be overridden later on) */
- Definition timestampDef = sehd.lookupInteger("timestamp"); //$NON-NLS-1$
- if (timestampDef instanceof IntegerDefinition) {
- timestamp = calculateTimestamp((IntegerDefinition) timestampDef);
+ IntegerDefinition timestampDef = sehd.lookupInteger("timestamp"); //$NON-NLS-1$
+ if (timestampDef != null) {
+ timestamp = calculateTimestamp(timestampDef);
} // else timestamp remains 0
/* Check for the variant v. */
}
/* Get the timestamp. This would overwrite any previous timestamp definition */
- timestampDef = variantCurrentField.lookupDefinition("timestamp"); //$NON-NLS-1$
- if (timestampDef instanceof IntegerDefinition) {
- timestamp = calculateTimestamp((IntegerDefinition) timestampDef);
+ Definition def = variantCurrentField.lookupDefinition("timestamp"); //$NON-NLS-1$
+ if (def instanceof IntegerDefinition) {
+ timestamp = calculateTimestamp((IntegerDefinition) def);
}
}
}