Make AnyObjectId and RemoteConfig Serializable. When using jgit as a library in other tools, it's helpful to be able to use the nice, tested bits of jgit rather than String, but need to be able to serialize them. Signed-off-by: Nigel Magnay <nigel.magnay@xxxxxxxxx> --- .../src/org/spearce/jgit/lib/AnyObjectId.java | 3 ++- .../org/spearce/jgit/transport/RemoteConfig.java | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/org.spearce.jgit/src/org/spearce/jgit/lib/AnyObjectId.java b/org.spearce.jgit/src/org/spearce/jgit/lib/AnyObjectId.java index e2f70ca..532174b 100644 --- a/org.spearce.jgit/src/org/spearce/jgit/lib/AnyObjectId.java +++ b/org.spearce.jgit/src/org/spearce/jgit/lib/AnyObjectId.java @@ -39,6 +39,7 @@ import java.io.IOException; import java.io.OutputStream; +import java.io.Serializable; import java.io.Writer; import java.nio.ByteBuffer; import java.util.Arrays; @@ -52,7 +53,7 @@ * with this instance can alter at any time, if this instance is modified to * represent a different object name. */ -public abstract class AnyObjectId implements Comparable { +public abstract class AnyObjectId implements Comparable, Serializable { static final int RAW_LEN = Constants.OBJECT_ID_LENGTH; static final int STR_LEN = RAW_LEN * 2; diff --git a/org.spearce.jgit/src/org/spearce/jgit/transport/RemoteConfig.java b/org.spearce.jgit/src/org/spearce/jgit/transport/RemoteConfig.java index 5bbf664..7949612 100644 --- a/org.spearce.jgit/src/org/spearce/jgit/transport/RemoteConfig.java +++ b/org.spearce.jgit/src/org/spearce/jgit/transport/RemoteConfig.java @@ -38,6 +38,7 @@ package org.spearce.jgit.transport; +import java.io.Serializable; import java.net.URISyntaxException; import java.util.ArrayList; import java.util.Collections; @@ -53,7 +54,7 @@ * describing how refs should be transferred between this repository and the * remote repository. */ -public class RemoteConfig { +public class RemoteConfig implements Serializable { private static final String SECTION = "remote"; private static final String KEY_URL = "url"; -- 1.6.0.2 -- 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