From: Robin Rosenberg <robin.rosenberg@dewire.com>
To: "Shawn O. Pearce" <spearce@spearce.org>
Cc: git@vger.kernel.org, "Shawn O. Pearce" <sop@google.com>
Subject: Re: [JGIT PATCH (RESEND) 3/3] Fix DirCache.findEntry to work on an empty cache
Date: Fri, 4 Sep 2009 01:14:12 +0200 [thread overview]
Message-ID: <200909040114.12980.robin.rosenberg@dewire.com> (raw)
In-Reply-To: <1251847010-9992-3-git-send-email-spearce@spearce.org>
onsdag 02 september 2009 01:16:50 skrev "Shawn O. Pearce" <spearce@spearce.org>:
> 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@google.com>
> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Is this a new policy?
-- robin
next prev parent reply other threads:[~2009-09-03 23:14 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-09-01 23:16 [JGIT PATCH (RESEND) 1/3] Allow RefUpdate.setExpectedOldObjectId to accept RevCommit Shawn O. Pearce
2009-09-01 23:16 ` [JGIT PATCH (RESEND) 2/3] Work around Sun javac compiler error in RefUpdate Shawn O. Pearce
2009-09-01 23:16 ` [JGIT PATCH (RESEND) 3/3] Fix DirCache.findEntry to work on an empty cache Shawn O. Pearce
2009-09-03 23:14 ` Robin Rosenberg [this message]
2009-09-03 23:19 ` Shawn O. Pearce
2009-09-04 0:06 ` Nicolas Pitre
2009-09-01 23:18 ` [JGIT PATCH (RESEND) 1/3] Allow RefUpdate.setExpectedOldObjectId to accept RevCommit Shawn O. Pearce
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200909040114.12980.robin.rosenberg@dewire.com \
--to=robin.rosenberg@dewire.com \
--cc=git@vger.kernel.org \
--cc=sop@google.com \
--cc=spearce@spearce.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).