[JGIT PATCH 06/21] Allow PackIndexWriter to use any subclass of PackedObjectInfo

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Some users of PackIndexWriter may have extended PackedObjectInfo
to store additional implementation specific details, but wish to
pass off their own subclass instances to avoid allocating even
more memory.

Signed-off-by: Shawn O. Pearce <spearce@xxxxxxxxxxx>
---
 .../src/org/spearce/jgit/lib/PackIndexWriter.java  |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/org.spearce.jgit/src/org/spearce/jgit/lib/PackIndexWriter.java b/org.spearce.jgit/src/org/spearce/jgit/lib/PackIndexWriter.java
index 3d0050d..567f099 100644
--- a/org.spearce.jgit/src/org/spearce/jgit/lib/PackIndexWriter.java
+++ b/org.spearce.jgit/src/org/spearce/jgit/lib/PackIndexWriter.java
@@ -86,7 +86,7 @@ public abstract class PackIndexWriter {
 	 */
 	@SuppressWarnings("fallthrough")
 	public static PackIndexWriter createOldestPossible(final OutputStream dst,
-			final List<PackedObjectInfo> objs) {
+			final List<? extends PackedObjectInfo> objs) {
 		int version = 1;
 		LOOP: for (final PackedObjectInfo oe : objs) {
 			switch (version) {
@@ -137,7 +137,7 @@ public abstract class PackIndexWriter {
 	protected final byte[] tmp;
 
 	/** The entries this writer must pack. */
-	protected List<PackedObjectInfo> entries;
+	protected List<? extends PackedObjectInfo> entries;
 
 	/** SHA-1 checksum for the entire pack data. */
 	protected byte[] packChecksum;
@@ -172,7 +172,7 @@ public abstract class PackIndexWriter {
 	 *             an error occurred while writing to the output stream, or this
 	 *             index format cannot store the object data supplied.
 	 */
-	public void write(final List<PackedObjectInfo> toStore,
+	public void write(final List<? extends PackedObjectInfo> toStore,
 			final byte[] packDataChecksum) throws IOException {
 		entries = toStore;
 		packChecksum = packDataChecksum;
-- 
1.5.6.74.g8a5e

--
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

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux