The experiment should be constructed only when all the traces are
initialized.
Change-Id: I1f5478013621ec3f135e409f4a0380688d7597f8
Signed-off-by: Geneviève Bastien <gbastien+lttng@versatic.net>
Reviewed-on: https://git.eclipse.org/r/84341
Reviewed-by: Matthew Khouzam <matthew.khouzam@ericsson.com>
Tested-by: Matthew Khouzam <matthew.khouzam@ericsson.com>
Reviewed-by: Hudson CI
for (int i = 0; i < traces.length; i++) {
traces[i] = new CtfTmfTrace();
}
- fExperiment = new TmfExperimentStub("MegaExperiment", traces, BLOCK_SIZE);
int j = 0;
for (int i = 0; i < (traces.length) && (j < traces.length); i++) {
String absolutePath = traceFiles[j].getAbsolutePath();
}
j++;
}
+ fExperiment = new TmfExperimentStub("MegaExperiment", traces, BLOCK_SIZE);
if (traces[traces.length - 1].getPath() == null) {
throw new TmfTraceException("Insufficient valid traces in directory");
}