onsdag 02 september 2009 01:16:50 skrev "Shawn O. Pearce" <spearce@xxxxxxxxxxx>: > If the cache has no entries, we want to return -1 rather than throw > ArrayIndexOutOfBoundsException. This binary search loop was stolen > from some other code which contained a test before the loop to see if > the collection was empty or not, but we failed to include that here. > > Flipping the loop around to a standard while loop ensures we test > the condition properly first. > > Signed-off-by: Shawn O. Pearce <sop@xxxxxxxxxx> > Signed-off-by: Shawn O. Pearce <spearce@xxxxxxxxxxx> Is this a new policy? -- robin -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html