From 10a12763d19f99031c08cd9e3eabb980137ab066 Mon Sep 17 00:00:00 2001 From: Matthew Khouzam Date: Thu, 19 Jul 2012 15:12:58 -0400 Subject: Fix negative timestamp seek bug. Change-Id: Ic0e77da05419261ff082103d0e232723b51a3be1 Signed-off-by: Matthew Khouzam Reviewed-on: https://git.eclipse.org/r/6871 Reviewed-by: Patrick Tasse IP-Clean: Patrick Tasse Tested-by: Patrick Tasse Reviewed-by: Mathieu Denis --- .../src/org/eclipse/linuxtools/tmf/core/ctfadaptor/CtfIterator.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/ctfadaptor/CtfIterator.java b/lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/ctfadaptor/CtfIterator.java index c18f0b5fed..39ffbf8343 100644 --- a/lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/ctfadaptor/CtfIterator.java +++ b/lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/ctfadaptor/CtfIterator.java @@ -17,10 +17,10 @@ import org.eclipse.linuxtools.tmf.core.trace.ITmfLocation; /** * The CTF trace reader iterator. - * + * * It doesn't reserve a file handle, so many iterators can be used without worries * of I/O errors or resource exhaustion. - * + * * @version 1.0 * @author Matthew Khouzam */ @@ -118,7 +118,7 @@ public class CtfIterator extends CTFTraceReader implements ITmfContext, Comparab final long offsetTimestamp = timestamp - this.getTrace().getOffset(); if (offsetTimestamp < 0) { - ret = super.seek(timestamp); + ret = super.seek(0L); } else { ret = super.seek(offsetTimestamp); } -- cgit v1.2.3