diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/revwalk/RevCommitParseTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/revwalk/RevCommitParseTest.java index 0ad724731..2f2784734 100644 --- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/revwalk/RevCommitParseTest.java +++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/revwalk/RevCommitParseTest.java @@ -338,7 +338,7 @@ public class RevCommitParseTest extends RepositoryTestCase { src.setCommitter(committer); src.setMessage("Test commit\n\nThis is a test.\n"); - RevCommit p = RevCommit.parse(src.format()); + RevCommit p = RevCommit.parse(src.build()); assertEquals(src.getTreeId(), p.getTree()); assertEquals(0, p.getParentCount()); assertEquals(author, p.getAuthorIdent()); diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/revwalk/RevTagParseTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/revwalk/RevTagParseTest.java index c694add44..9300ae2e1 100644 --- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/revwalk/RevTagParseTest.java +++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/revwalk/RevTagParseTest.java @@ -407,7 +407,7 @@ public class RevTagParseTest extends RepositoryTestCase { src.setTag("a.test"); src.setMessage("Test tag\n\nThis is a test.\n"); - RevTag p = RevTag.parse(src.format()); + RevTag p = RevTag.parse(src.build()); assertEquals(src.getObjectId(), p.getObject()); assertEquals(committer, p.getTaggerIdent()); assertEquals("a.test", p.getTagName()); diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/lib/CommitBuilder.java b/org.eclipse.jgit/src/org/eclipse/jgit/lib/CommitBuilder.java index 8bd02ee29..288b1d483 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/lib/CommitBuilder.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/lib/CommitBuilder.java @@ -288,8 +288,8 @@ public class CommitBuilder { * the encoding specified by {@link #getEncoding()} is not * supported by this Java runtime. */ - public byte[] format() throws UnsupportedEncodingException { - return format(new ObjectInserter.Formatter()); + public byte[] build() throws UnsupportedEncodingException { + return build(new ObjectInserter.Formatter()); } /** @@ -308,7 +308,7 @@ public class CommitBuilder { * the encoding specified by {@link #getEncoding()} is not * supported by this Java runtime. */ - public byte[] format(ObjectInserter oi) throws UnsupportedEncodingException { + public byte[] build(ObjectInserter oi) throws UnsupportedEncodingException { ByteArrayOutputStream os = new ByteArrayOutputStream(); OutputStreamWriter w = new OutputStreamWriter(os, getEncoding()); try { diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/lib/ObjectInserter.java b/org.eclipse.jgit/src/org/eclipse/jgit/lib/ObjectInserter.java index adc20b5b0..7d02c86dd 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/lib/ObjectInserter.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/lib/ObjectInserter.java @@ -189,7 +189,7 @@ public abstract class ObjectInserter { * the object could not be stored. */ public final ObjectId insert(CommitBuilder builder) throws IOException { - return insert(Constants.OBJ_COMMIT, builder.format(this)); + return insert(Constants.OBJ_COMMIT, builder.build(this)); } /** @@ -205,7 +205,7 @@ public abstract class ObjectInserter { * the object could not be stored. */ public final ObjectId insert(TagBuilder builder) throws IOException { - return insert(Constants.OBJ_TAG, builder.format(this)); + return insert(Constants.OBJ_TAG, builder.build(this)); } /** diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/lib/TagBuilder.java b/org.eclipse.jgit/src/org/eclipse/jgit/lib/TagBuilder.java index 71e46494c..8eadb6145 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/lib/TagBuilder.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/lib/TagBuilder.java @@ -182,8 +182,8 @@ public class TagBuilder { * @return this object in the canonical annotated tag format, suitable for * storage in a repository. */ - public byte[] format() { - return format(new ObjectInserter.Formatter()); + public byte[] build() { + return build(new ObjectInserter.Formatter()); } /** @@ -199,7 +199,7 @@ public class TagBuilder { * @return this object in the canonical annotated tag format, suitable for * storage in a repository. */ - public byte[] format(ObjectInserter oi) { + public byte[] build(ObjectInserter oi) { ByteArrayOutputStream os = new ByteArrayOutputStream(); OutputStreamWriter w = new OutputStreamWriter(os, Constants.CHARSET); try {