]> source.dussan.org Git - jgit.git/commitdiff
s/StringBuffer/StringBuilder as appropriate where no concurrency is needed 43/343/1
authorKarthik K <oss.akk@gmail.com>
Fri, 12 Mar 2010 07:31:38 +0000 (23:31 -0800)
committerKarthik K <oss.akk@gmail.com>
Fri, 12 Mar 2010 07:31:38 +0000 (23:31 -0800)
13 files changed:
org.eclipse.jgit/src/org/eclipse/jgit/lib/Config.java
org.eclipse.jgit/src/org/eclipse/jgit/lib/FileTreeEntry.java
org.eclipse.jgit/src/org/eclipse/jgit/lib/GitlinkTreeEntry.java
org.eclipse.jgit/src/org/eclipse/jgit/lib/PersonIdent.java
org.eclipse.jgit/src/org/eclipse/jgit/lib/SymlinkTreeEntry.java
org.eclipse.jgit/src/org/eclipse/jgit/lib/Tag.java
org.eclipse.jgit/src/org/eclipse/jgit/lib/Tree.java
org.eclipse.jgit/src/org/eclipse/jgit/lib/TreeEntry.java
org.eclipse.jgit/src/org/eclipse/jgit/revwalk/filter/AndRevFilter.java
org.eclipse.jgit/src/org/eclipse/jgit/revwalk/filter/OrRevFilter.java
org.eclipse.jgit/src/org/eclipse/jgit/treewalk/filter/AndTreeFilter.java
org.eclipse.jgit/src/org/eclipse/jgit/treewalk/filter/OrTreeFilter.java
org.eclipse.jgit/src/org/eclipse/jgit/treewalk/filter/PathFilterGroup.java

index 0d0c377f8fcc05504e41c7aa4b5a2edf3d446557..062c1c3974ff69b122ecd3a9797a715e3a21e108 100644 (file)
@@ -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();
index 9ff4deca353f5782516f3a746893f86b669e46c8..3da91dd2a2d89ab0455d0af7b8478802478c7bc8 100644 (file)
@@ -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');
index a0007591280ef8441403b24ee3998b850cf23638..fdee615016d94b0ed0174c9f5f42d43965a800e1 100644 (file)
@@ -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());
index 49d727f8e1ffba685cab7dc95ba57f1d51b7971d..0bc2e7a2df220c6eaa0a80ac0d682625b849096d 100644 (file)
@@ -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());
index 81666be45da415a5af75bff847024a30b34d1c35..abb31c152282487113ba98ae0f376e19436fae89 100644 (file)
@@ -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());
index 0e1c1651de119dc34ac98539e64316156990cba3..35ccf773cf196b1eca6a06815e436535a9b6390c 100644 (file)
@@ -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) {
index 130d3ded905f58bf62b9fb3d574d7e3c7d1d7ec9..61607cba95193c55007cb79f1b5b91c75ee81bb3 100644 (file)
@@ -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());
index b6dd9311ae90ebd9cd95de4999ee4c179abffb52..58f2bc74cdbbb60e4f1942c8f23e4df44e74bc5e 100644 (file)
@@ -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) {
index 406a7764d529cdbab6e6a4497e2cc3c73b4f9e39..112f07aede775cd0bafb90b26b835b98ce5b2195 100644 (file)
@@ -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)
index 540e7cba6f991e4d2c455c151373ae5a41e9b3fa..bd1314a934634b16f11f0bb3151a86004cb4df40 100644 (file)
@@ -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)
index 7ba6af5fc56ff93c815f36fed410fdd11e00ae2d..9a6156f082706f9ef70217e7395ab2852bbe46c6 100644 (file)
@@ -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)
index 455031fc1ac7ec8003e94dd789fd93431824f1b8..f14ceeab32ce5933120605ebf5120b31773298a9 100644 (file)
@@ -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)
index ced799b7433a589c7c9e22f7eaa07efc1dcbc0e2..e58512da35bed67bbe115ea7980621f5be2c8f0d 100644 (file)
@@ -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)