Robin Rosenberg <robin.rosenberg.lists@xxxxxxxxxx> wrote: > > diff --git a/org.spearce.jgit/src/org/spearce/jgit/lib/OffsetCache.java b/org.spearce.jgit/src/org/spearce/jgit/lib/OffsetCache.java > > + private void gc() { > > + R r; > > + while ((r = (R) queue.poll()) != null) { > > + // Sun's Java 5 and 6 implementation have a bug where a Reference > > + // can be enqueued and dequeued twice on the same reference queue > > + // due to a race condition within ReferenceQueue.enqueue(Reference). > > Reference to the official Sun bug? Might help if someone wants to > implement a flag to avoid this (if necessary...) Actually, this is a new bug. I tried looking through BugParade but nobody has mentioned or discovered this before. I submitted a bug report yesterday, but they have yet to publish it. So, no link. > > + protected int hash(final int packHash, final long position) { > > + return (packHash + (int) (position >>> 4)) >>> 1; > > + } > > Since we never use the baselass this one isn't covered... ok anyway I think. This particular implementation I planned on using in UnpackedObjectCache if I rewrote it using OffsetCache. But I could also just make it abstract here. Maybe that is the better approach. I'll amend that into the series. -- Shawn. -- 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