tmf: Bug 495219: Fix NPE in checkpoint indexer seeking on disposed trace
authorPatrick Tasse <patrick.tasse@gmail.com>
Thu, 2 Jun 2016 21:10:00 +0000 (17:10 -0400)
committerPatrick Tasse <patrick.tasse@gmail.com>
Tue, 7 Jun 2016 18:46:19 +0000 (14:46 -0400)
commit7b3400bd1c99cfd700b342a3563bd04ce6d5156e
treecdfa254cebc716c9dd1f423dc88b9ac6d5be317c
parentd89151ba34c29c9667679d7c5b70ee8bd2796b61
tmf: Bug 495219: Fix NPE in checkpoint indexer seeking on disposed trace

In BTree, if it is disposed (file is null), return -1 (insertion point
0) in the binary search. This will correspond to checkpoint 0 in the
flat array.

In FlatArray, if it is disposed (file is null) return null as checkpoint
in get(long).

In TmfCheckpointIndexer, if the returned checkpoint is null in
restoreCheckpoint(long), return the context given by the trace
implementation of seekEvent((ITmfLocation) null). It should properly
handle a disposed trace.

Change-Id: I3148d2e10118628e387d206054de55d5238a9807
Signed-off-by: Patrick Tasse <patrick.tasse@gmail.com>
Reviewed-on: https://git.eclipse.org/r/74474
Reviewed-by: Hudson CI
Reviewed-by: Matthew Khouzam <matthew.khouzam@ericsson.com>
Tested-by: Matthew Khouzam <matthew.khouzam@ericsson.com>
Reviewed-by: Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
Tested-by: Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
tmf/org.eclipse.tracecompass.tmf.core/src/org/eclipse/tracecompass/internal/tmf/core/trace/indexer/BTree.java
tmf/org.eclipse.tracecompass.tmf.core/src/org/eclipse/tracecompass/internal/tmf/core/trace/indexer/FlatArray.java
tmf/org.eclipse.tracecompass.tmf.core/src/org/eclipse/tracecompass/tmf/core/trace/indexer/checkpoint/TmfCheckpointIndexer.java
This page took 0.024928 seconds and 5 git commands to generate.