From: Nigel Magnay <nigel.magnay@gmail.com>
To: Git ML <git@vger.kernel.org>
Subject: [PATCH JGIT] Minor : Make ObjectId, RemoteConfig Serializable
Date: Fri, 6 Feb 2009 21:15:29 +0000 [thread overview]
Message-ID: <320075ff0902061315g3f8b9c9bj92f528e700d59c50@mail.gmail.com> (raw)
In-Reply-To: <320075ff0902060702n7573aaecu9054626ee9a6991@mail.gmail.com>
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@gmail.com>
---
.../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
next parent reply other threads:[~2009-02-06 21:17 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <320075ff0902060702n7573aaecu9054626ee9a6991@mail.gmail.com>
2009-02-06 21:15 ` Nigel Magnay [this message]
2009-02-08 2:13 ` [PATCH JGIT] Minor : Make ObjectId, RemoteConfig Serializable Robin Rosenberg
2009-02-08 13:26 ` Nigel Magnay
2009-02-08 19:10 ` Shawn O. Pearce
2009-02-08 19:45 ` Robin Rosenberg
2009-02-08 19:47 ` 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=320075ff0902061315g3f8b9c9bj92f528e700d59c50@mail.gmail.com \
--to=nigel.magnay@gmail.com \
--cc=git@vger.kernel.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).