DESCRIPTION

Ctf: Callsite bug fix when POS = -1

Change-Id: Id1fdb06c717299f7b0fa8ad0576485d35003ce2b
Signed-off-by: Kelsie Blackwell xxx@xxx.xxx


COMMENTS

author: Kelsie Blackwell
date: 2013-05-13 16:48:52.000000000

Uploaded patch set 2.

-------------------------------------
author: Brenden Conley
date: 2013-05-13 16:48:58.000000000

Patch Set 2:

Build Started https://hudson.eclipse.org/sandbox/job/linuxtools/2288/ 

-------------------------------------
author: Brenden Conley
date: 2013-05-13 17:00:33.000000000

Patch Set 2: Fails

Build Failed 

https://hudson.eclipse.org/sandbox/job/linuxtools/2288/ : FAILURE

-------------------------------------
author: Braxton Mccarthy
date: 2013-05-13 19:59:59.000000000

Patch Set 2: I would prefer that you didn't submit this

(1 inline comment)



Line:923, lttng/org.eclipse.linuxtools.ctf.core/src/org/eclipse/linuxtools/ctf/core/trace/CTFTrace.java -> I didn't catch that this came from the binarySearch call earlier...

Collections.binarySearch is a bit unintuitive. It will return the position if it matches it exactly, but "-position" (aka, "0 - position") if there is no exact match. So it might not only return -1, but any -position. So you could check if pos < 0, then use -pos to get the closest matching position.

Maybe we should talk with Matthew about this code snippet.

-------------------------------------
