]> source.dussan.org Git - gitblit.git/commitdiff
Switch from StringBuffer to StringBuilder
authorJames Moger <james.moger@gitblit.com>
Fri, 31 Aug 2012 12:15:03 +0000 (08:15 -0400)
committerJames Moger <james.moger@gitblit.com>
Fri, 31 Aug 2012 12:15:03 +0000 (08:15 -0400)
src/com/gitblit/utils/StringUtils.java
src/com/gitblit/wicket/WicketUtils.java

index c13be8adbd50209966d1b5c23f68ef9f93e5dd79..08fd497229ac8414d608baf1a6714851bb98e782 100644 (file)
@@ -78,7 +78,7 @@ public class StringUtils {
         * @return plain text escaped for html\r
         */\r
        public static String escapeForHtml(String inStr, boolean changeSpace) {\r
-               StringBuffer retStr = new StringBuffer();\r
+               StringBuilder retStr = new StringBuilder();\r
                int i = 0;\r
                while (i < inStr.length()) {\r
                        if (inStr.charAt(i) == '&') {\r
@@ -119,7 +119,7 @@ public class StringUtils {
         * @return properly escaped url\r
         */\r
        public static String encodeURL(String inStr) {\r
-               StringBuffer retStr = new StringBuffer();\r
+               StringBuilder retStr = new StringBuilder();\r
                int i = 0;\r
                while (i < inStr.length()) {\r
                        if (inStr.charAt(i) == '/') {\r
index 34a14a13e74e0ed0033ec055aa6a980a305076e3..90f7ee68b08110f4b07b5876d77f5d3c2a0a0038 100644 (file)
@@ -250,7 +250,7 @@ public class WicketUtils {
                        public void renderHead(IHeaderResponse response) {\r
                                String contentType = "application/rss+xml";\r
 \r
-                               StringBuffer buffer = new StringBuffer();\r
+                               StringBuilder buffer = new StringBuilder();\r
                                buffer.append("<link rel=\"alternate\" ");\r
                                buffer.append("type=\"").append(contentType).append("\" ");\r
                                buffer.append("title=\"").append(feedTitle).append("\" ");\r