tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r832021 - in /tomcat/trunk/java/org/apache/catalina/tribes: ./ group/ group/interceptors/ io/ membership/ tipis/ transport/bio/ util/
Date Mon, 02 Nov 2009 18:37:27 GMT
Author: markt
Date: Mon Nov  2 18:37:26 2009
New Revision: 832021

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

Modified:
    tomcat/trunk/java/org/apache/catalina/tribes/ChannelException.java
    tomcat/trunk/java/org/apache/catalina/tribes/UniqueId.java
    tomcat/trunk/java/org/apache/catalina/tribes/group/GroupChannel.java
    tomcat/trunk/java/org/apache/catalina/tribes/group/RpcChannel.java
    tomcat/trunk/java/org/apache/catalina/tribes/group/RpcMessage.java
    tomcat/trunk/java/org/apache/catalina/tribes/group/interceptors/NonBlockingCoordinator.java
    tomcat/trunk/java/org/apache/catalina/tribes/group/interceptors/ThroughputInterceptor.java
    tomcat/trunk/java/org/apache/catalina/tribes/io/ChannelData.java
    tomcat/trunk/java/org/apache/catalina/tribes/membership/MemberImpl.java
    tomcat/trunk/java/org/apache/catalina/tribes/tipis/AbstractReplicatedMap.java
    tomcat/trunk/java/org/apache/catalina/tribes/transport/bio/BioSender.java
    tomcat/trunk/java/org/apache/catalina/tribes/util/Arrays.java
    tomcat/trunk/java/org/apache/catalina/tribes/util/StringManager.java

Modified: tomcat/trunk/java/org/apache/catalina/tribes/ChannelException.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/tribes/ChannelException.java?rev=832021&r1=832020&r2=832021&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/tribes/ChannelException.java (original)
+++ tomcat/trunk/java/org/apache/catalina/tribes/ChannelException.java Mon Nov  2 18:37:26
2009
@@ -81,7 +81,7 @@
      * @see java.lang.Exception#getMessage()
      */
     public String getMessage() {
-        StringBuffer buf = new StringBuffer(super.getMessage());
+        StringBuilder buf = new StringBuilder(super.getMessage());
         if (faultyMembers==null || faultyMembers.size() == 0 ) {
             buf.append("; No faulty members identified.");
         } else {

Modified: tomcat/trunk/java/org/apache/catalina/tribes/UniqueId.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/tribes/UniqueId.java?rev=832021&r1=832020&r2=832021&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/tribes/UniqueId.java (original)
+++ tomcat/trunk/java/org/apache/catalina/tribes/UniqueId.java Mon Nov  2 18:37:26 2009
@@ -64,7 +64,7 @@
     }
     
     public String toString() {
-        StringBuffer buf = new StringBuffer("UniqueId");
+        StringBuilder buf = new StringBuilder("UniqueId");
         buf.append(org.apache.catalina.tribes.util.Arrays.toString(id));
         return buf.toString();
     }

Modified: tomcat/trunk/java/org/apache/catalina/tribes/group/GroupChannel.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/tribes/group/GroupChannel.java?rev=832021&r1=832020&r2=832021&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/tribes/group/GroupChannel.java (original)
+++ tomcat/trunk/java/org/apache/catalina/tribes/group/GroupChannel.java Mon Nov  2 18:37:26
2009
@@ -367,7 +367,7 @@
      * @throws ChannelException
      */
     protected void checkOptionFlags() throws ChannelException {
-        StringBuffer conflicts = new StringBuffer();
+        StringBuilder conflicts = new StringBuilder();
         ChannelInterceptor first = interceptors;
         while ( first != null ) {
             int flag = first.getOptionFlag();

Modified: tomcat/trunk/java/org/apache/catalina/tribes/group/RpcChannel.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/tribes/group/RpcChannel.java?rev=832021&r1=832020&r2=832021&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/tribes/group/RpcChannel.java (original)
+++ tomcat/trunk/java/org/apache/catalina/tribes/group/RpcChannel.java Mon Nov  2 18:37:26
2009
@@ -251,7 +251,7 @@
     }
     
     protected static String bToS(byte[] data) {
-        StringBuffer buf = new StringBuffer(4*16);
+        StringBuilder buf = new StringBuilder(4*16);
         buf.append("{");
         for (int i=0; data!=null && i<data.length; i++ ) buf.append(String.valueOf(data[i])).append("
");
         buf.append("}");

Modified: tomcat/trunk/java/org/apache/catalina/tribes/group/RpcMessage.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/tribes/group/RpcMessage.java?rev=832021&r1=832020&r2=832021&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/tribes/group/RpcMessage.java (original)
+++ tomcat/trunk/java/org/apache/catalina/tribes/group/RpcMessage.java Mon Nov  2 18:37:26
2009
@@ -72,7 +72,7 @@
     }
     
     public String toString() {
-        StringBuffer buf = new StringBuffer("RpcMessage[");
+        StringBuilder buf = new StringBuilder("RpcMessage[");
         buf.append(super.toString());
         buf.append("] rpcId=");
         buf.append(Arrays.toString(rpcId));

Modified: tomcat/trunk/java/org/apache/catalina/tribes/group/interceptors/NonBlockingCoordinator.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/tribes/group/interceptors/NonBlockingCoordinator.java?rev=832021&r1=832020&r2=832021&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/tribes/group/interceptors/NonBlockingCoordinator.java
(original)
+++ tomcat/trunk/java/org/apache/catalina/tribes/group/interceptors/NonBlockingCoordinator.java
Mon Nov  2 18:37:26 2009
@@ -817,7 +817,7 @@
         }
         
         public String toString() {
-            StringBuffer buf = new StringBuffer("CoordinationEvent[type=");
+            StringBuilder buf = new StringBuilder("CoordinationEvent[type=");
             buf.append(type).append("\n\tLocal:");
             Member local = interceptor.getLocalMember(false);
             buf.append(local!=null?local.getName():"").append("\n\tCoord:");

Modified: tomcat/trunk/java/org/apache/catalina/tribes/group/interceptors/ThroughputInterceptor.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/tribes/group/interceptors/ThroughputInterceptor.java?rev=832021&r1=832020&r2=832021&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/tribes/group/interceptors/ThroughputInterceptor.java
(original)
+++ tomcat/trunk/java/org/apache/catalina/tribes/group/interceptors/ThroughputInterceptor.java
Mon Nov  2 18:37:26 2009
@@ -88,7 +88,7 @@
     }
     
     public void report(double timeTx) {
-        StringBuffer buf = new StringBuffer("ThroughputInterceptor Report[\n\tTx Msg:");
+        StringBuilder buf = new StringBuilder("ThroughputInterceptor Report[\n\tTx Msg:");
         buf.append(msgTxCnt).append(" messages\n\tSent:");
         buf.append(df.format(mbTx));
         buf.append(" MB (total)\n\tSent:");

Modified: tomcat/trunk/java/org/apache/catalina/tribes/io/ChannelData.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/tribes/io/ChannelData.java?rev=832021&r1=832020&r2=832021&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/tribes/io/ChannelData.java (original)
+++ tomcat/trunk/java/org/apache/catalina/tribes/io/ChannelData.java Mon Nov  2 18:37:26 2009
@@ -339,7 +339,7 @@
     }
     
     public String toString() {
-        StringBuffer buf = new StringBuffer();
+        StringBuilder buf = new StringBuilder();
         buf.append("ClusterData[src=");
         buf.append(getAddress()).append("; id=");
         buf.append(bToS(getUniqueId())).append("; sent=");
@@ -348,7 +348,7 @@
     }
     
     public static String bToS(byte[] data) {
-        StringBuffer buf = new StringBuffer(4*16);
+        StringBuilder buf = new StringBuilder(4*16);
         buf.append("{");
         for (int i=0; data!=null && i<data.length; i++ ) buf.append(String.valueOf(data[i])).append("
");
         buf.append("}");

Modified: tomcat/trunk/java/org/apache/catalina/tribes/membership/MemberImpl.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/tribes/membership/MemberImpl.java?rev=832021&r1=832020&r2=832021&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/tribes/membership/MemberImpl.java (original)
+++ tomcat/trunk/java/org/apache/catalina/tribes/membership/MemberImpl.java Mon Nov  2 18:37:26
2009
@@ -508,7 +508,7 @@
      * String representation of this object
      */
     public String toString()  {
-        StringBuffer buf = new StringBuffer("org.apache.catalina.tribes.membership.MemberImpl[");
+        StringBuilder buf = new StringBuilder("org.apache.catalina.tribes.membership.MemberImpl[");
         buf.append(getName()).append(",");
         buf.append(getHostname()).append(",");
         buf.append(port).append(", alive=");
@@ -526,7 +526,7 @@
         return bToS(data,data.length);
     }
     public static String bToS(byte[] data, int max) {
-        StringBuffer buf = new StringBuffer(4*16);
+        StringBuilder buf = new StringBuilder(4*16);
         buf.append("{");
         for (int i=0; data!=null && i<data.length; i++ ) {
             buf.append(String.valueOf(data[i])).append(" ");

Modified: tomcat/trunk/java/org/apache/catalina/tribes/tipis/AbstractReplicatedMap.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/tribes/tipis/AbstractReplicatedMap.java?rev=832021&r1=832020&r2=832021&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/tribes/tipis/AbstractReplicatedMap.java (original)
+++ tomcat/trunk/java/org/apache/catalina/tribes/tipis/AbstractReplicatedMap.java Mon Nov
 2 18:37:26 2009
@@ -1197,7 +1197,7 @@
         }
         
         public String toString() {
-            StringBuffer buf = new StringBuffer("MapEntry[key:");
+            StringBuilder buf = new StringBuilder("MapEntry[key:");
             buf.append(getKey()).append("; ");
             buf.append("value:").append(getValue()).append("; ");
             buf.append("primary:").append(isPrimary()).append("; ");
@@ -1236,7 +1236,7 @@
         private Member primary;
         
         public String toString() {
-            StringBuffer buf = new StringBuffer("MapMessage[context=");
+            StringBuilder buf = new StringBuilder("MapMessage[context=");
             buf.append(new String(mapId));
             buf.append("; type=");
             buf.append(getTypeDesc());

Modified: tomcat/trunk/java/org/apache/catalina/tribes/transport/bio/BioSender.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/tribes/transport/bio/BioSender.java?rev=832021&r1=832020&r2=832021&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/tribes/transport/bio/BioSender.java (original)
+++ tomcat/trunk/java/org/apache/catalina/tribes/transport/bio/BioSender.java Mon Nov  2 18:37:26
2009
@@ -150,7 +150,7 @@
      * Name of this SockerSender
      */
     public String toString() {
-        StringBuffer buf = new StringBuffer("DataSender[(");
+        StringBuilder buf = new StringBuilder("DataSender[(");
         buf.append(super.toString()).append(")");
         buf.append(getAddress()).append(":").append(getPort()).append("]");
         return buf.toString();

Modified: tomcat/trunk/java/org/apache/catalina/tribes/util/Arrays.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/tribes/util/Arrays.java?rev=832021&r1=832020&r2=832021&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/tribes/util/Arrays.java (original)
+++ tomcat/trunk/java/org/apache/catalina/tribes/util/Arrays.java Mon Nov  2 18:37:26 2009
@@ -60,7 +60,7 @@
     }
     
     public static String toString(byte[] data, int offset, int length, boolean asInt) {
-        StringBuffer buf = new StringBuffer("{");
+        StringBuilder buf = new StringBuilder("{");
         if ( data != null && length > 0 ) {
             if (asInt) buf.append((int)data[offset++]);
             else buf.append(data[offset++]);
@@ -77,7 +77,7 @@
     }
     
     public static String toString(Object[] data, int offset, int length) {
-        StringBuffer buf = new StringBuffer("{");
+        StringBuilder buf = new StringBuilder("{");
         if ( data != null && length > 0 ) {
             buf.append(data[offset++]);
             for (int i = offset; i < length; i++) {
@@ -93,7 +93,7 @@
     }
     
     public static String toNameString(Member[] data, int offset, int length) {
-        StringBuffer buf = new StringBuffer("{");
+        StringBuilder buf = new StringBuilder("{");
         if ( data != null && length > 0 ) {
             buf.append(data[offset++].getName());
             for (int i = offset; i < length; i++) {

Modified: tomcat/trunk/java/org/apache/catalina/tribes/util/StringManager.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/tribes/util/StringManager.java?rev=832021&r1=832020&r2=832021&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/tribes/util/StringManager.java (original)
+++ tomcat/trunk/java/org/apache/catalina/tribes/util/StringManager.java Mon Nov  2 18:37:26
2009
@@ -154,7 +154,7 @@
 
             iString = MessageFormat.format(value, nonNullArgs);
         } catch (IllegalArgumentException iae) {
-            StringBuffer buf = new StringBuffer();
+            StringBuilder buf = new StringBuilder();
             buf.append(value);
             for (int i = 0; i < args.length; i++) {
                 buf.append(" arg[" + i + "]=" + args[i]);



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


Mime
View raw message