aboutsummaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit/src/org/eclipse/jgit
diff options
context:
space:
mode:
authorShawn O. Pearce <spearce@spearce.org>2010-12-03 12:23:39 -0800
committerShawn O. Pearce <spearce@spearce.org>2010-12-03 12:28:00 -0800
commitf996fb1796c260c9848a83f081f78ca53eb206b8 (patch)
tree384a6d72ae1a2807b88327741e042ee86ffb15d7 /org.eclipse.jgit/src/org/eclipse/jgit
parent37001ddc8df83237840896ed82fe584a9163c698 (diff)
downloadjgit-f996fb1796c260c9848a83f081f78ca53eb206b8.tar.gz
jgit-f996fb1796c260c9848a83f081f78ca53eb206b8.zip
Correct CommitBuilder, TagBuilder method to be build()
The correct names for these is build(), as that is what a Java developer will expect given the "builder" pattern. Bug: 323541 Change-Id: I35042bdc95a955beeaee29e54bde10e4240b2a71 Signed-off-by: Shawn O. Pearce <spearce@spearce.org> Reviewed-by: Chris Aniszczyk <caniszczyk@gmail.com>
Diffstat (limited to 'org.eclipse.jgit/src/org/eclipse/jgit')
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/lib/CommitBuilder.java6
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/lib/ObjectInserter.java4
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/lib/TagBuilder.java6
3 files changed, 8 insertions, 8 deletions
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 8bd02ee298..288b1d4831 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 adc20b5b08..7d02c86ddd 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 71e46494c6..8eadb6145c 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 {