tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r832013 - in /tomcat/trunk/java/org/apache/catalina/manager: JMXProxyServlet.java JspHelper.java ManagerServlet.java StatusTransformer.java host/HTMLHostManagerServlet.java host/HostManagerServlet.java
Date Mon, 02 Nov 2009 18:32:08 GMT
Author: markt
Date: Mon Nov  2 18:32:07 2009
New Revision: 832013

URL: http://svn.apache.org/viewvc?rev=832013&view=rev
Log:
StringBuffer -> StringBuilder for o.a.c.manager

Modified:
    tomcat/trunk/java/org/apache/catalina/manager/JMXProxyServlet.java
    tomcat/trunk/java/org/apache/catalina/manager/JspHelper.java
    tomcat/trunk/java/org/apache/catalina/manager/ManagerServlet.java
    tomcat/trunk/java/org/apache/catalina/manager/StatusTransformer.java
    tomcat/trunk/java/org/apache/catalina/manager/host/HTMLHostManagerServlet.java
    tomcat/trunk/java/org/apache/catalina/manager/host/HostManagerServlet.java

Modified: tomcat/trunk/java/org/apache/catalina/manager/JMXProxyServlet.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/manager/JMXProxyServlet.java?rev=832013&r1=832012&r2=832013&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/manager/JMXProxyServlet.java (original)
+++ tomcat/trunk/java/org/apache/catalina/manager/JMXProxyServlet.java Mon Nov  2 18:32:07
2009
@@ -201,7 +201,7 @@
         if( idx < 0 ) return value;
 
         int prev=0;
-        StringBuffer sb=new StringBuffer();
+        StringBuilder sb=new StringBuilder();
         while( idx >= 0 ) {
             appendHead(sb, value, prev, idx);
 
@@ -215,7 +215,7 @@
         return sb.toString();
     }
 
-    private void appendHead( StringBuffer sb, String value, int start, int end) {
+    private void appendHead( StringBuilder sb, String value, int start, int end) {
         if (end < 1) return;
 
         int pos=start;

Modified: tomcat/trunk/java/org/apache/catalina/manager/JspHelper.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/manager/JspHelper.java?rev=832013&r1=832012&r2=832013&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/manager/JspHelper.java (original)
+++ tomcat/trunk/java/org/apache/catalina/manager/JspHelper.java Mon Nov  2 18:32:07 2009
@@ -104,7 +104,7 @@
     }
 
     public static String secondsToTimeString(long in_seconds) {
-        StringBuffer buff = new StringBuffer(9);
+        StringBuilder buff = new StringBuilder(9);
         long rest = in_seconds;
         long hour = rest / 3600;
         rest = rest % 3600;
@@ -172,16 +172,16 @@
         int start = 0;
         int length = buffer.length();
         char[] arrayBuffer = buffer.toCharArray();
-        StringBuffer escapedBuffer = null;
+        StringBuilder escapedBuffer = null;
 
         for (int i = 0; i < length; i++) {
             char c = arrayBuffer[i];
             if (c <= HIGHEST_SPECIAL) {
                 char[] escaped = specialCharactersRepresentation[c];
                 if (escaped != null) {
-                    // create StringBuffer to hold escaped xml string
+                    // create StringBuilder to hold escaped xml string
                     if (start == 0) {
-                        escapedBuffer = new StringBuffer(length + 5);
+                        escapedBuffer = new StringBuilder(length + 5);
                     }
                     // add unescaped portion
                     if (start < i) {

Modified: tomcat/trunk/java/org/apache/catalina/manager/ManagerServlet.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/manager/ManagerServlet.java?rev=832013&r1=832012&r2=832013&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/manager/ManagerServlet.java (original)
+++ tomcat/trunk/java/org/apache/catalina/manager/ManagerServlet.java Mon Nov  2 18:32:07
2009
@@ -1041,7 +1041,7 @@
         if (debug >= 1)
             log("serverinfo");
         try {
-            StringBuffer props = new StringBuffer();
+            StringBuilder props = new StringBuilder();
             props.append("OK - Server info");
             props.append("\nTomcat Version: ");
             props.append(ServerInfo.getServerInfo());

Modified: tomcat/trunk/java/org/apache/catalina/manager/StatusTransformer.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/manager/StatusTransformer.java?rev=832013&r1=832012&r2=832013&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/manager/StatusTransformer.java (original)
+++ tomcat/trunk/java/org/apache/catalina/manager/StatusTransformer.java Mon Nov  2 18:32:07
2009
@@ -833,7 +833,7 @@
 
         char content[] = new char[message.length()];
         message.getChars(0, message.length(), content, 0);
-        StringBuffer result = new StringBuffer(content.length + 50);
+        StringBuilder result = new StringBuilder(content.length + 50);
         for (int i = 0; i < content.length; i++) {
             switch (content[i]) {
             case '<':

Modified: tomcat/trunk/java/org/apache/catalina/manager/host/HTMLHostManagerServlet.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/manager/host/HTMLHostManagerServlet.java?rev=832013&r1=832012&r2=832013&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/manager/host/HTMLHostManagerServlet.java (original)
+++ tomcat/trunk/java/org/apache/catalina/manager/host/HTMLHostManagerServlet.java Mon Nov
 2 18:32:07 2009
@@ -360,7 +360,7 @@
                 args = new Object[2];
                 args[0] = RequestUtil.filter(hostName);
                 String[] aliases = host.findAliases();
-                StringBuffer buf = new StringBuffer();
+                StringBuilder buf = new StringBuilder();
                 if (aliases.length > 0) {
                     buf.append(aliases[0]);
                     for (int j = 1; j < aliases.length; j++) {

Modified: tomcat/trunk/java/org/apache/catalina/manager/host/HostManagerServlet.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/manager/host/HostManagerServlet.java?rev=832013&r1=832012&r2=832013&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/manager/host/HostManagerServlet.java (original)
+++ tomcat/trunk/java/org/apache/catalina/manager/host/HostManagerServlet.java Mon Nov  2
18:32:07 2009
@@ -537,7 +537,7 @@
             Host host = (Host) hosts[i];
             String name = host.getName();
             String[] aliases = host.findAliases();
-            StringBuffer buf = new StringBuffer();
+            StringBuilder buf = new StringBuilder();
             if (aliases.length > 0) {
                 buf.append(aliases[0]);
                 for (int j = 1; j < aliases.length; j++) {



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message