Fix for bug 382268: IllegalArgumentException in CtfTmfTrace on getNext
authorPatrick Tasse <patrick.tasse@gmail.com>
Mon, 11 Jun 2012 16:09:29 +0000 (12:09 -0400)
committerPatrick Tasse <patrick.tasse@gmail.com>
Mon, 11 Jun 2012 16:09:29 +0000 (12:09 -0400)
with end-of-trace context.

org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/ctfadaptor/CtfTmfTrace.java

index 33f0ba457dc033ace485e34af54f40b618c4fb71..46716abac092e201dd96fba824deb72591a63280 100644 (file)
@@ -242,6 +242,9 @@ public class CtfTmfTrace extends TmfTrace<CtfTmfEvent> implements ITmfEventParse
     public synchronized CtfTmfEvent getNext(final ITmfContext context) {
         CtfTmfEvent event = null;
         if (context instanceof CtfTmfLightweightContext) {
+            if (CtfLocation.INVALID_LOCATION.equals(context.getLocation())) {
+                return null;
+            }
             CtfTmfLightweightContext ctfContext = (CtfTmfLightweightContext) context;
             event = ctfContext.getCurrentEvent();
 
This page took 0.02638 seconds and 5 git commands to generate.