2010-06-05 fchouinard@gmail.com Contributions for bugs 292965, 292963, 293102,...
[deliverable/tracecompass.git] / org.eclipse.linuxtools.lttng.tests / src / org / eclipse / linuxtools / lttng / LttngTestPreparation.java
index 1d0724bced8bdb3cfa6b590078004c2d73647f63..41fe461273b3844dfc8867b019e9636a20ca507f 100644 (file)
@@ -17,7 +17,6 @@ import org.eclipse.linuxtools.lttng.state.experiment.StateManagerFactory;
 import org.eclipse.linuxtools.lttng.tests.LTTngCoreTestPlugin;
 import org.eclipse.linuxtools.lttng.trace.LTTngTextTrace;
 import org.eclipse.linuxtools.lttng.trace.LTTngTrace;
-import org.eclipse.linuxtools.tmf.event.TmfEvent;
 import org.eclipse.linuxtools.tmf.event.TmfTimeRange;
 import org.eclipse.linuxtools.tmf.experiment.TmfExperiment;
 import org.eclipse.linuxtools.tmf.request.TmfDataRequest;
@@ -204,7 +203,6 @@ public abstract class LttngTestPreparation extends TestCase {
                }
 
                int DEFAULT_CHUNK = 1;
-               final TmfEvent[] evt = new TmfEvent[1];
        
                // time range
                TmfTimeRange trange = new TmfTimeRange(new LttngTimestamp(
@@ -216,21 +214,18 @@ public abstract class LttngTestPreparation extends TestCase {
                TmfEventRequest<T> request = new TmfEventRequest<T>(k,
                                trange, TmfDataRequest.ALL_DATA, DEFAULT_CHUNK) {
        
-                       @SuppressWarnings("unchecked")
                        @Override
                        public void handleData() {
-                               TmfEvent[] result = getData();
+                               T[] result = getData();
        
-                               evt[0] = (result.length > 0) ? result[0] : null;
-                               if (evt[0] == null) {
+                               T event = (result.length > 0) ? result[0] : null;
+                               if (event == null) {
                                        System.out
                                                        .println("Syntheric Event Received is null, after event: "
                                                                        + feventCount);
                                        return;
                                }
        
-                               T event = (T) evt[0];
-       
                                // Listen to only one variant of synthetic event to keep
                                // track of
                                if (event instanceof LttngSyntheticEvent) {
This page took 0.025186 seconds and 5 git commands to generate.