aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Wolf <thomas.wolf@paranor.ch>2016-10-24 09:29:30 +0200
committerThomas Wolf <thomas.wolf@paranor.ch>2016-10-29 11:39:36 +0200
commitd0023c3c8f1efed0ff54de42541efed01224f424 (patch)
tree46768f23f92f75ef3f9ff95e4decd49ff7e3f502
parent88f433be84e27468d9234b0305b97139d593c8a9 (diff)
downloadjgit-d0023c3c8f1efed0ff54de42541efed01224f424.tar.gz
jgit-d0023c3c8f1efed0ff54de42541efed01224f424.zip
Don't serialize internal hash collision chain link
ObjectId is serializable, and so are its subtypes. Ensure that serialization does not follow the hash collision chain internal to the ObjectIdOwnerMap, otherwise completely unrelated objects may get serialized when a RevObject is serialized. Note that serializing a RevCommit or RevTag may serialize quite a few objects due to the parent/object links they contain. A user has no real control over how many objects will be written when a RevCommit is serialized. C.f [1]. This change does not resolve that, but in any case this internal hash collision chain link should not participate in serialization. [1] https://github.com/gitblit/gitblit/pull/1141 Change-Id: Ice331a9dc80a59ca360fcc04adaff8b5e750d847 Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/lib/ObjectIdOwnerMap.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/lib/ObjectIdOwnerMap.java b/org.eclipse.jgit/src/org/eclipse/jgit/lib/ObjectIdOwnerMap.java
index 442261cbd5..f6613d5832 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/lib/ObjectIdOwnerMap.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/lib/ObjectIdOwnerMap.java
@@ -341,7 +341,7 @@ public class ObjectIdOwnerMap<V extends ObjectIdOwnerMap.Entry>
/** Type of entry stored in the {@link ObjectIdOwnerMap}. */
public static abstract class Entry extends ObjectId {
- Entry next;
+ transient Entry next;
/**
* Initialize this entry with a specific ObjectId.