tmf : Fix binary search end time in InMemoryBackend
authorJean-Christian Kouame <kadjo.gwandy.jean-christian.kouame@ericsson.com>
Fri, 28 Jun 2013 19:06:35 +0000 (15:06 -0400)
committerAlexandre Montplaisir <alexmonthy@voxpopuli.im>
Tue, 2 Jul 2013 14:30:56 +0000 (10:30 -0400)
first interval was not always considered in memory backend request

Change-Id: I3741d182d362da835a08a1771fa87421744c9fff
Signed-off-by: Jean-Christian Kouame
Reviewed-on: https://git.eclipse.org/r/14117
Tested-by: Hudson CI
Reviewed-by: Matthew Khouzam <matthew.khouzam@ericsson.com>
IP-Clean: Matthew Khouzam <matthew.khouzam@ericsson.com>
Tested-by: Matthew Khouzam <matthew.khouzam@ericsson.com>
Reviewed-by: Alexandre Montplaisir <alexmonthy@voxpopuli.im>
IP-Clean: Alexandre Montplaisir <alexmonthy@voxpopuli.im>
Tested-by: Alexandre Montplaisir <alexmonthy@voxpopuli.im>
org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/internal/tmf/core/statesystem/backends/InMemoryBackend.java

index cfd6841abe05b71be7216a7ca793742417a522b0..b4eedf3d1df7b2488f047c6031ed775aadc429bc 100644 (file)
@@ -185,7 +185,7 @@ public class InMemoryBackend implements IStateHistoryBackend {
 
         /* The returned value is < 0 if the exact key was not found. */
         if (mid < 0) {
-            mid = -mid;
+            mid = -mid - 1;
         }
 
         /*
This page took 0.027873 seconds and 5 git commands to generate.