aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKarthik K2010-03-12 02:31:38 (EST)
committerKarthik K2010-03-12 02:31:38 (EST)
commit2c14e78a225f4bb7d7d1e82ace2bacee5a6b153e (patch)
treefd939ced487a0574a4b5ed6fa6471baa8bb8b544
parent48af6a5f539f66e6880a862f046160e5d4ee9af4 (diff)
downloadjgit-2c14e78a225f4bb7d7d1e82ace2bacee5a6b153e.zip
jgit-2c14e78a225f4bb7d7d1e82ace2bacee5a6b153e.tar.gz
jgit-2c14e78a225f4bb7d7d1e82ace2bacee5a6b153e.tar.bz2
s/StringBuffer/StringBuilder as appropriate where no concurrency is neededrefs/changes/43/343/1
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/lib/Config.java6
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/lib/FileTreeEntry.java2
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/lib/GitlinkTreeEntry.java2
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/lib/PersonIdent.java8
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/lib/SymlinkTreeEntry.java2
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/lib/Tag.java2
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/lib/Tree.java2
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/lib/TreeEntry.java4
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/revwalk/filter/AndRevFilter.java2
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/revwalk/filter/OrRevFilter.java2
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/treewalk/filter/AndTreeFilter.java2
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/treewalk/filter/OrTreeFilter.java2
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/treewalk/filter/PathFilterGroup.java2
13 files changed, 19 insertions, 19 deletions
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/lib/Config.java b/org.eclipse.jgit/src/org/eclipse/jgit/lib/Config.java
index 0d0c377..062c1c3 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/lib/Config.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/lib/Config.java
@@ -118,7 +118,7 @@ public class Config {
private static String escapeValue(final String x) {
boolean inquote = false;
int lineStart = 0;
- final StringBuffer r = new StringBuffer(x.length());
+ final StringBuilder r = new StringBuilder(x.length());
for (int k = 0; k < x.length(); k++) {
final char c = x.charAt(k);
switch (c) {
@@ -897,7 +897,7 @@ public class Config {
private static String readKeyName(final StringReader in)
throws ConfigInvalidException {
- final StringBuffer name = new StringBuffer();
+ final StringBuilder name = new StringBuilder();
for (;;) {
int c = in.read();
if (c < 0)
@@ -944,7 +944,7 @@ public class Config {
private static String readValue(final StringReader in, boolean quote,
final int eol) throws ConfigInvalidException {
- final StringBuffer value = new StringBuffer();
+ final StringBuilder value = new StringBuilder();
boolean space = false;
for (;;) {
int c = in.read();
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/lib/FileTreeEntry.java b/org.eclipse.jgit/src/org/eclipse/jgit/lib/FileTreeEntry.java
index 9ff4dec..3da91dd 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/lib/FileTreeEntry.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/lib/FileTreeEntry.java
@@ -106,7 +106,7 @@ public class FileTreeEntry extends TreeEntry {
}
public String toString() {
- final StringBuffer r = new StringBuffer();
+ final StringBuilder r = new StringBuilder();
r.append(ObjectId.toString(getId()));
r.append(' ');
r.append(isExecutable() ? 'X' : 'F');
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/lib/GitlinkTreeEntry.java b/org.eclipse.jgit/src/org/eclipse/jgit/lib/GitlinkTreeEntry.java
index a000759..fdee615 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/lib/GitlinkTreeEntry.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/lib/GitlinkTreeEntry.java
@@ -83,7 +83,7 @@ public class GitlinkTreeEntry extends TreeEntry {
@Override
public String toString() {
- final StringBuffer r = new StringBuffer();
+ final StringBuilder r = new StringBuilder();
r.append(ObjectId.toString(getId()));
r.append(" G ");
r.append(getFullName());
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/lib/PersonIdent.java b/org.eclipse.jgit/src/org/eclipse/jgit/lib/PersonIdent.java
index 49d727f..0bc2e7a 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/lib/PersonIdent.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/lib/PersonIdent.java
@@ -251,7 +251,7 @@ public class PersonIdent {
* @return this person's declared time zone; null if time zone is unknown.
*/
public TimeZone getTimeZone() {
- StringBuffer tzId = new StringBuffer(8);
+ StringBuilder tzId = new StringBuilder(8);
tzId.append("GMT");
appendTimezone(tzId);
return TimeZone.getTimeZone(tzId.toString());
@@ -285,7 +285,7 @@ public class PersonIdent {
* @return a string in the git author format
*/
public String toExternalString() {
- final StringBuffer r = new StringBuffer();
+ final StringBuilder r = new StringBuilder();
r.append(getName());
r.append(" <");
r.append(getEmailAddress());
@@ -296,7 +296,7 @@ public class PersonIdent {
return r.toString();
}
- private void appendTimezone(final StringBuffer r) {
+ private void appendTimezone(final StringBuilder r) {
int offset = tzOffset;
final char sign;
final int offsetHours;
@@ -324,7 +324,7 @@ public class PersonIdent {
}
public String toString() {
- final StringBuffer r = new StringBuffer();
+ final StringBuilder r = new StringBuilder();
final SimpleDateFormat dtfmt;
dtfmt = new SimpleDateFormat("EEE MMM d HH:mm:ss yyyy Z", Locale.US);
dtfmt.setTimeZone(getTimeZone());
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/lib/SymlinkTreeEntry.java b/org.eclipse.jgit/src/org/eclipse/jgit/lib/SymlinkTreeEntry.java
index 81666be..abb31c1 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/lib/SymlinkTreeEntry.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/lib/SymlinkTreeEntry.java
@@ -81,7 +81,7 @@ public class SymlinkTreeEntry extends TreeEntry {
}
public String toString() {
- final StringBuffer r = new StringBuffer();
+ final StringBuilder r = new StringBuilder();
r.append(ObjectId.toString(getId()));
r.append(" S ");
r.append(getFullName());
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/lib/Tag.java b/org.eclipse.jgit/src/org/eclipse/jgit/lib/Tag.java
index 0e1c165..35ccf77 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/lib/Tag.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/lib/Tag.java
@@ -163,7 +163,7 @@ public class Tag {
throw new CorruptObjectException(tagId, "no tagger/bad header");
// Message should start with an empty line, but
- StringBuffer tempMessage = new StringBuffer();
+ StringBuilder tempMessage = new StringBuilder();
char[] readBuf = new char[2048];
int readLen;
while ((readLen = br.read(readBuf)) > 0) {
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/lib/Tree.java b/org.eclipse.jgit/src/org/eclipse/jgit/lib/Tree.java
index 130d3de..61607cb 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/lib/Tree.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/lib/Tree.java
@@ -598,7 +598,7 @@ public class Tree extends TreeEntry implements Treeish {
}
public String toString() {
- final StringBuffer r = new StringBuffer();
+ final StringBuilder r = new StringBuilder();
r.append(ObjectId.toString(getId()));
r.append(" T ");
r.append(getFullName());
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/lib/TreeEntry.java b/org.eclipse.jgit/src/org/eclipse/jgit/lib/TreeEntry.java
index b6dd931..58f2bc7 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/lib/TreeEntry.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/lib/TreeEntry.java
@@ -210,7 +210,7 @@ public abstract class TreeEntry implements Comparable {
* @return repository relative name of this entry
*/
public String getFullName() {
- final StringBuffer r = new StringBuffer();
+ final StringBuilder r = new StringBuilder();
appendFullName(r);
return r.toString();
}
@@ -285,7 +285,7 @@ public abstract class TreeEntry implements Comparable {
*/
public abstract FileMode getMode();
- private void appendFullName(final StringBuffer r) {
+ private void appendFullName(final StringBuilder r) {
final TreeEntry p = getParent();
final String n = getName();
if (p != null) {
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/filter/AndRevFilter.java b/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/filter/AndRevFilter.java
index 406a776..112f07a 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/filter/AndRevFilter.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/filter/AndRevFilter.java
@@ -170,7 +170,7 @@ public abstract class AndRevFilter extends RevFilter {
@Override
public String toString() {
- final StringBuffer r = new StringBuffer();
+ final StringBuilder r = new StringBuilder();
r.append("(");
for (int i = 0; i < subfilters.length; i++) {
if (i > 0)
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/filter/OrRevFilter.java b/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/filter/OrRevFilter.java
index 540e7cb..bd1314a 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/filter/OrRevFilter.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/filter/OrRevFilter.java
@@ -168,7 +168,7 @@ public abstract class OrRevFilter extends RevFilter {
@Override
public String toString() {
- final StringBuffer r = new StringBuffer();
+ final StringBuilder r = new StringBuilder();
r.append("(");
for (int i = 0; i < subfilters.length; i++) {
if (i > 0)
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/treewalk/filter/AndTreeFilter.java b/org.eclipse.jgit/src/org/eclipse/jgit/treewalk/filter/AndTreeFilter.java
index 7ba6af5..9a6156f 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/treewalk/filter/AndTreeFilter.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/treewalk/filter/AndTreeFilter.java
@@ -182,7 +182,7 @@ public abstract class AndTreeFilter extends TreeFilter {
@Override
public String toString() {
- final StringBuffer r = new StringBuffer();
+ final StringBuilder r = new StringBuilder();
r.append("(");
for (int i = 0; i < subfilters.length; i++) {
if (i > 0)
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/treewalk/filter/OrTreeFilter.java b/org.eclipse.jgit/src/org/eclipse/jgit/treewalk/filter/OrTreeFilter.java
index 455031f..f14ceea 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/treewalk/filter/OrTreeFilter.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/treewalk/filter/OrTreeFilter.java
@@ -180,7 +180,7 @@ public abstract class OrTreeFilter extends TreeFilter {
@Override
public String toString() {
- final StringBuffer r = new StringBuffer();
+ final StringBuilder r = new StringBuilder();
r.append("(");
for (int i = 0; i < subfilters.length; i++) {
if (i > 0)
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/treewalk/filter/PathFilterGroup.java b/org.eclipse.jgit/src/org/eclipse/jgit/treewalk/filter/PathFilterGroup.java
index ced799b..e58512d 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/treewalk/filter/PathFilterGroup.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/treewalk/filter/PathFilterGroup.java
@@ -192,7 +192,7 @@ public class PathFilterGroup {
}
public String toString() {
- final StringBuffer r = new StringBuffer();
+ final StringBuilder r = new StringBuilder();
r.append("FAST(");
for (int i = 0; i < paths.length; i++) {
if (i > 0)