diff options
author | Matthew Khouzam | 2012-05-15 18:35:38 +0000 |
---|---|---|
committer | Matthew Khouzam | 2012-05-15 19:21:27 +0000 |
commit | af012053b5520f859762798230e9410ad07373f8 (patch) | |
tree | 151578ef0e0484ef8280aaae7a31abcfdb50e0d6 /lttng/org.eclipse.linuxtools.tmf.core | |
parent | 1c1ec293c271224c7d73a2360168dfbdbf4244e7 (diff) | |
download | org.eclipse.linuxtools-af012053b5520f859762798230e9410ad07373f8.tar.gz org.eclipse.linuxtools-af012053b5520f859762798230e9410ad07373f8.tar.xz org.eclipse.linuxtools-af012053b5520f859762798230e9410ad07373f8.zip |
Check if a trace is empty before going to the last event.
Diffstat (limited to 'lttng/org.eclipse.linuxtools.tmf.core')
-rw-r--r-- | lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/ctfadaptor/CtfTmfTrace.java | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/ctfadaptor/CtfTmfTrace.java b/lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/ctfadaptor/CtfTmfTrace.java index 1a329e34ed..c4e67958e1 100644 --- a/lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/ctfadaptor/CtfTmfTrace.java +++ b/lttng/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/ctfadaptor/CtfTmfTrace.java @@ -106,7 +106,12 @@ public class CtfTmfTrace extends TmfEventProvider<CtfTmfEvent> implements ITmfTr this.setStartTime(TmfTimestamp.BIG_BANG); } else { this.setStartTime(iterator.getCurrentEvent().getTimestamp()); - iterator.goToLastEvent(); + /* + * is the trace empty + */ + if( iterator.hasMoreEvents()){ + iterator.goToLastEvent(); + } this.setEndTime(iterator.getCurrentEvent().getTimestamp()); } @@ -514,6 +519,7 @@ public class CtfTmfTrace extends TmfEventProvider<CtfTmfEvent> implements ITmfTr * sub-classes. * @throws TmfTraceException */ + @SuppressWarnings({ "static-method", "unused" }) protected void buildStateSystem() throws TmfTraceException { /* * Nothing is done in the basic implementation, please specify |