Author: manik.surtani(a)jboss.com
Date: 2008-06-26 18:58:07 -0400 (Thu, 26 Jun 2008)
New Revision: 6073
Modified:
core/branches/2.2.X/src/main/java/org/jboss/cache/buddyreplication/BuddyGroup.java
core/branches/2.2.X/src/main/java/org/jboss/cache/commands/read/GetKeyValueCommand.java
core/branches/2.2.X/src/main/java/org/jboss/cache/commands/write/PutKeyValueCommand.java
core/branches/2.2.X/src/main/java/org/jboss/cache/config/CacheLoaderConfig.java
core/branches/2.2.X/src/main/java/org/jboss/cache/eviction/ElementSizeConfiguration.java
core/branches/2.2.X/src/main/java/org/jboss/cache/eviction/FIFOConfiguration.java
core/branches/2.2.X/src/main/java/org/jboss/cache/eviction/LFUConfiguration.java
core/branches/2.2.X/src/main/java/org/jboss/cache/eviction/LRUConfiguration.java
core/branches/2.2.X/src/main/java/org/jboss/cache/eviction/MRUConfiguration.java
core/branches/2.2.X/src/main/java/org/jboss/cache/eviction/NodeEntry.java
core/branches/2.2.X/src/main/java/org/jboss/cache/factories/XmlConfigurationParser.java
core/branches/2.2.X/src/main/java/org/jboss/cache/invocation/NodeInvocationDelegate.java
core/branches/2.2.X/src/main/java/org/jboss/cache/loader/tcp/TcpCacheServer.java
core/branches/2.2.X/src/main/java/org/jboss/cache/lock/IdentityLock.java
core/branches/2.2.X/src/main/java/org/jboss/cache/lock/LockMap.java
core/branches/2.2.X/src/main/java/org/jboss/cache/lock/NodeBasedLockManager.java
core/branches/2.2.X/src/main/java/org/jboss/cache/lock/NodeLock.java
core/branches/2.2.X/src/main/java/org/jboss/cache/lock/PessimisticNodeBasedLockManager.java
core/branches/2.2.X/src/main/java/org/jboss/cache/lock/ReadWriteLockWithUpgrade.java
core/branches/2.2.X/src/main/java/org/jboss/cache/marshall/MethodCall.java
core/branches/2.2.X/src/main/java/org/jboss/cache/optimistic/WorkspaceNodeImpl.java
core/branches/2.2.X/src/main/java/org/jboss/cache/util/CachePrinter.java
core/branches/2.2.X/src/main/java/org/jboss/cache/xml/XmlHelper.java
core/branches/2.2.X/src/test/java/org/jboss/cache/lock/IdentityLockTest.java
core/branches/2.2.X/src/test/java/org/jboss/cache/marshall/data/Debug.java
core/branches/2.2.X/src/test/java/org/jboss/cache/marshall/data/Person.java
core/branches/2.2.X/src/test/java/org/jboss/cache/statetransfer/StateTransferTestBase.java
core/branches/2.2.X/src/test/java/org/jboss/cache/util/TestingUtil.java
Log:
Converted StringBuffers to StringBuilders.
Modified:
core/branches/2.2.X/src/main/java/org/jboss/cache/buddyreplication/BuddyGroup.java
===================================================================
---
core/branches/2.2.X/src/main/java/org/jboss/cache/buddyreplication/BuddyGroup.java 2008-06-26
22:56:53 UTC (rev 6072)
+++
core/branches/2.2.X/src/main/java/org/jboss/cache/buddyreplication/BuddyGroup.java 2008-06-26
22:58:07 UTC (rev 6073)
@@ -89,7 +89,7 @@
@Override
public String toString()
{
- StringBuffer b = new StringBuffer("BuddyGroup: (");
+ StringBuilder b = new StringBuilder("BuddyGroup: (");
b.append("dataOwner: ").append(dataOwner).append(", ");
b.append("groupName: ").append(groupName).append(", ");
b.append("buddies: ").append(buddies).append(",");
Modified:
core/branches/2.2.X/src/main/java/org/jboss/cache/commands/read/GetKeyValueCommand.java
===================================================================
---
core/branches/2.2.X/src/main/java/org/jboss/cache/commands/read/GetKeyValueCommand.java 2008-06-26
22:56:53 UTC (rev 6072)
+++
core/branches/2.2.X/src/main/java/org/jboss/cache/commands/read/GetKeyValueCommand.java 2008-06-26
22:58:07 UTC (rev 6073)
@@ -2,7 +2,10 @@
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.jboss.cache.*;
+import org.jboss.cache.DataContainer;
+import org.jboss.cache.Fqn;
+import org.jboss.cache.InvocationContext;
+import org.jboss.cache.NodeSPI;
import org.jboss.cache.commands.Visitor;
import org.jboss.cache.notifications.Notifier;
@@ -51,7 +54,7 @@
{
if (trace)
{
- log.trace(new
StringBuffer("get(").append("\"").append(fqn).append("\",
\"").append(key).append("\", \"").
+ log.trace(new
StringBuilder("get(").append("\"").append(fqn).append("\",
\"").append(key).append("\", \"").
append(sendNodeEvent).append("\")"));
}
NodeSPI n = dataContainer.peek(fqn);
Modified:
core/branches/2.2.X/src/main/java/org/jboss/cache/commands/write/PutKeyValueCommand.java
===================================================================
---
core/branches/2.2.X/src/main/java/org/jboss/cache/commands/write/PutKeyValueCommand.java 2008-06-26
22:56:53 UTC (rev 6072)
+++
core/branches/2.2.X/src/main/java/org/jboss/cache/commands/write/PutKeyValueCommand.java 2008-06-26
22:58:07 UTC (rev 6073)
@@ -55,7 +55,7 @@
{
if (trace)
{
- log.trace(new
StringBuffer("perform(").append(globalTransaction).append(",
\"").
+ log.trace(new
StringBuilder("perform(").append(globalTransaction).append(",
\"").
append(fqn).append("\", k=").append(key).append(",
v=").append(value).append(")"));
}
NodeSPI n = dataContainer.peekStrict(globalTransaction, fqn, false);
Modified: core/branches/2.2.X/src/main/java/org/jboss/cache/config/CacheLoaderConfig.java
===================================================================
---
core/branches/2.2.X/src/main/java/org/jboss/cache/config/CacheLoaderConfig.java 2008-06-26
22:56:53 UTC (rev 6072)
+++
core/branches/2.2.X/src/main/java/org/jboss/cache/config/CacheLoaderConfig.java 2008-06-26
22:58:07 UTC (rev 6073)
@@ -89,7 +89,7 @@
@Override
public String toString()
{
- return new
StringBuffer().append("CacheLoaderConfig{").append("shared=").append(shared).append(",
passivation=").append(passivation).append(",
preload='").append(preload).append('\'').append(",
cacheLoaderConfigs.size()=").append(cacheLoaderConfigs.size()).append('}').toString();
+ return new
StringBuilder().append("CacheLoaderConfig{").append("shared=").append(shared).append(",
passivation=").append(passivation).append(",
preload='").append(preload).append('\'').append(",
cacheLoaderConfigs.size()=").append(cacheLoaderConfigs.size()).append('}').toString();
}
public void setShared(boolean shared)
@@ -319,7 +319,7 @@
@Override
public String toString()
{
- return new
StringBuffer().append("IndividualCacheLoaderConfig{").append("className='").append(className).append('\'')
+ return new
StringBuilder().append("IndividualCacheLoaderConfig{").append("className='").append(className).append('\'')
.append(", async=").append(async)
.append(", ignoreModifications=").append(ignoreModifications)
.append(", fetchPersistentState=").append(fetchPersistentState)
Modified:
core/branches/2.2.X/src/main/java/org/jboss/cache/eviction/ElementSizeConfiguration.java
===================================================================
---
core/branches/2.2.X/src/main/java/org/jboss/cache/eviction/ElementSizeConfiguration.java 2008-06-26
22:56:53 UTC (rev 6072)
+++
core/branches/2.2.X/src/main/java/org/jboss/cache/eviction/ElementSizeConfiguration.java 2008-06-26
22:58:07 UTC (rev 6073)
@@ -78,7 +78,7 @@
@Override
public String toString()
{
- StringBuffer str = new StringBuffer();
+ StringBuilder str = new StringBuilder();
str.append("ElementSizeConfiguration: maxElementsPerNode =");
str.append(getMaxElementsPerNode()).append(" maxNodes
=").append(getMaxNodes());
return str.toString();
Modified:
core/branches/2.2.X/src/main/java/org/jboss/cache/eviction/FIFOConfiguration.java
===================================================================
---
core/branches/2.2.X/src/main/java/org/jboss/cache/eviction/FIFOConfiguration.java 2008-06-26
22:56:53 UTC (rev 6072)
+++
core/branches/2.2.X/src/main/java/org/jboss/cache/eviction/FIFOConfiguration.java 2008-06-26
22:58:07 UTC (rev 6073)
@@ -55,7 +55,7 @@
@Override
public String toString()
{
- StringBuffer ret = new StringBuffer();
+ StringBuilder ret = new StringBuilder();
ret.append("LFUConfiguration: maxNodes = ").append(getMaxNodes());
return ret.toString();
}
Modified:
core/branches/2.2.X/src/main/java/org/jboss/cache/eviction/LFUConfiguration.java
===================================================================
---
core/branches/2.2.X/src/main/java/org/jboss/cache/eviction/LFUConfiguration.java 2008-06-26
22:56:53 UTC (rev 6072)
+++
core/branches/2.2.X/src/main/java/org/jboss/cache/eviction/LFUConfiguration.java 2008-06-26
22:58:07 UTC (rev 6073)
@@ -53,7 +53,7 @@
@Override
public String toString()
{
- StringBuffer ret = new StringBuffer();
+ StringBuilder ret = new StringBuilder();
ret.append("LFUConfiguration: maxNodes =
").append(getMaxNodes()).append(" minNodes = ").append(getMinNodes());
return ret.toString();
}
Modified:
core/branches/2.2.X/src/main/java/org/jboss/cache/eviction/LRUConfiguration.java
===================================================================
---
core/branches/2.2.X/src/main/java/org/jboss/cache/eviction/LRUConfiguration.java 2008-06-26
22:56:53 UTC (rev 6072)
+++
core/branches/2.2.X/src/main/java/org/jboss/cache/eviction/LRUConfiguration.java 2008-06-26
22:58:07 UTC (rev 6073)
@@ -90,7 +90,7 @@
@Override
public String toString()
{
- StringBuffer str = new StringBuffer();
+ StringBuilder str = new StringBuilder();
str.append("LRUConfiguration: timeToLiveSeconds =
").append(getTimeToLiveSeconds()).append(" maxAgeSeconds =");
str.append(getMaxAgeSeconds()).append(" maxNodes
=").append(getMaxNodes());
return str.toString();
Modified:
core/branches/2.2.X/src/main/java/org/jboss/cache/eviction/MRUConfiguration.java
===================================================================
---
core/branches/2.2.X/src/main/java/org/jboss/cache/eviction/MRUConfiguration.java 2008-06-26
22:56:53 UTC (rev 6072)
+++
core/branches/2.2.X/src/main/java/org/jboss/cache/eviction/MRUConfiguration.java 2008-06-26
22:58:07 UTC (rev 6073)
@@ -59,7 +59,7 @@
@Override
public String toString()
{
- StringBuffer str = new StringBuffer();
+ StringBuilder str = new StringBuilder();
str.append("MRUConfiguration: ").
append(" maxNodes =").append(getMaxNodes());
return str.toString();
Modified: core/branches/2.2.X/src/main/java/org/jboss/cache/eviction/NodeEntry.java
===================================================================
--- core/branches/2.2.X/src/main/java/org/jboss/cache/eviction/NodeEntry.java 2008-06-26
22:56:53 UTC (rev 6072)
+++ core/branches/2.2.X/src/main/java/org/jboss/cache/eviction/NodeEntry.java 2008-06-26
22:58:07 UTC (rev 6073)
@@ -150,7 +150,7 @@
@Override
public String toString()
{
- StringBuffer output = new StringBuffer();
+ StringBuilder output = new StringBuilder();
output.append("Fqn: ");
if (fqn != null)
{
Modified:
core/branches/2.2.X/src/main/java/org/jboss/cache/factories/XmlConfigurationParser.java
===================================================================
---
core/branches/2.2.X/src/main/java/org/jboss/cache/factories/XmlConfigurationParser.java 2008-06-26
22:56:53 UTC (rev 6072)
+++
core/branches/2.2.X/src/main/java/org/jboss/cache/factories/XmlConfigurationParser.java 2008-06-26
22:58:07 UTC (rev 6073)
@@ -619,7 +619,7 @@
*/
public static String parseClusterConfigXml(Element config)
{
- StringBuffer buffer = new StringBuffer();
+ StringBuilder buffer = new StringBuilder();
NodeList stack = config.getChildNodes();
int length = stack.getLength();
Modified:
core/branches/2.2.X/src/main/java/org/jboss/cache/invocation/NodeInvocationDelegate.java
===================================================================
---
core/branches/2.2.X/src/main/java/org/jboss/cache/invocation/NodeInvocationDelegate.java 2008-06-26
22:56:53 UTC (rev 6072)
+++
core/branches/2.2.X/src/main/java/org/jboss/cache/invocation/NodeInvocationDelegate.java 2008-06-26
22:58:07 UTC (rev 6073)
@@ -110,12 +110,12 @@
node.addChild(nodeName, nodeToAdd);
}
- public void printDetails(StringBuffer sb, int indent)
+ public void printDetails(StringBuilder sb, int indent)
{
node.printDetails(sb, indent);
}
- public void print(StringBuffer sb, int indent)
+ public void print(StringBuilder sb, int indent)
{
throw new CacheException("This method is deprecated!");
}
Modified:
core/branches/2.2.X/src/main/java/org/jboss/cache/loader/tcp/TcpCacheServer.java
===================================================================
---
core/branches/2.2.X/src/main/java/org/jboss/cache/loader/tcp/TcpCacheServer.java 2008-06-26
22:56:53 UTC (rev 6072)
+++
core/branches/2.2.X/src/main/java/org/jboss/cache/loader/tcp/TcpCacheServer.java 2008-06-26
22:58:07 UTC (rev 6073)
@@ -208,7 +208,7 @@
{
synchronized (conns)
{
- StringBuffer sb = new StringBuffer();
+ StringBuilder sb = new StringBuilder();
sb.append(conns.size()).append(" connections:\n");
for (Connection c : conns)
{
@@ -450,7 +450,7 @@
@Override
public String toString()
{
- StringBuffer sb = new StringBuffer();
+ StringBuilder sb = new StringBuilder();
if (sock != null)
{
sb.append(sock.getRemoteSocketAddress());
Modified: core/branches/2.2.X/src/main/java/org/jboss/cache/lock/IdentityLock.java
===================================================================
--- core/branches/2.2.X/src/main/java/org/jboss/cache/lock/IdentityLock.java 2008-06-26
22:56:53 UTC (rev 6072)
+++ core/branches/2.2.X/src/main/java/org/jboss/cache/lock/IdentityLock.java 2008-06-26
22:58:07 UTC (rev 6073)
@@ -154,13 +154,13 @@
{
if (trace)
{
- log.trace(new StringBuffer("acquiring WL:
fqn=").append(getFqn()).append(", caller=").append(caller).
+ log.trace(new StringBuilder("acquiring WL:
fqn=").append(getFqn()).append(", caller=").append(caller).
append(", lock=").append(toString(PRINT_LOCK_DETAILS)));
}
boolean flag = acquireWriteLock0(caller, timeout);
if (trace)
{
- log.trace(new StringBuffer("acquired WL:
fqn=").append(getFqn()).append(", caller=").append(caller).
+ log.trace(new StringBuilder("acquired WL:
fqn=").append(getFqn()).append(", caller=").append(caller).
append(", lock=").append(toString(PRINT_LOCK_DETAILS)));
}
return flag;
@@ -254,13 +254,13 @@
{
if (trace)
{
- log.trace(new StringBuffer("acquiring RL:
fqn=").append(getFqn()).append(", caller=").append(caller).
+ log.trace(new StringBuilder("acquiring RL:
fqn=").append(getFqn()).append(", caller=").append(caller).
append(", lock=").append(toString(PRINT_LOCK_DETAILS)));
}
boolean flag = acquireReadLock0(caller, timeout);
if (trace)
{
- log.trace(new StringBuffer("acquired RL:
fqn=").append(getFqn()).append(", caller=").append(caller).
+ log.trace(new StringBuilder("acquired RL:
fqn=").append(getFqn()).append(", caller=").append(caller).
append(", lock=").append(toString(PRINT_LOCK_DETAILS)));
}
return flag;
@@ -295,7 +295,7 @@
{
if (trace)
{
- StringBuffer sb = new StringBuffer(64);
+ StringBuilder sb = new StringBuilder(64);
sb.append("acquireReadLock(): caller
").append(caller).append(" already owns lock for ").append(getFqn());
log.trace(sb.toString());
}
@@ -307,7 +307,7 @@
// we don't need to synchronize from here on because we own the semaphore
if (!rc)
{
- StringBuffer sb = new StringBuffer();
+ StringBuilder sb = new StringBuilder();
sb.append("read lock for ").append(getFqn()).append(" could not
be acquired by ").append(caller);
sb.append(" after ").append(timeout).append(" ms. " +
"Locks: ").append(map.printInfo());
sb.append(", lock info: ").append(toString(true));
@@ -420,17 +420,17 @@
public String toString(boolean print_lock_details)
{
- StringBuffer sb = new StringBuffer();
+ StringBuilder sb = new StringBuilder();
toString(sb, print_lock_details);
return sb.toString();
}
- public void toString(StringBuffer sb)
+ public void toString(StringBuilder sb)
{
toString(sb, false);
}
- public void toString(StringBuffer sb, boolean print_lock_details)
+ public void toString(StringBuilder sb, boolean print_lock_details)
{
boolean printed_read_owners = false;
Collection<Object> read_owners = lock != null ? getReaderOwners() : null;
@@ -489,7 +489,7 @@
}
catch (UpgradeException e)
{
- StringBuffer buf = new StringBuffer("failure upgrading lock:
fqn=").append(getFqn()).append(", caller=").append(caller).
+ StringBuilder buf = new StringBuilder("failure upgrading lock:
fqn=").append(getFqn()).append(", caller=").append(caller).
append(", lock=").append(toString(true));
if (trace)
{
@@ -499,7 +499,7 @@
}
catch (LockingException e)
{
- StringBuffer buf = new StringBuffer("failure acquiring lock:
fqn=").append(getFqn()).append(", caller=").append(caller).
+ StringBuilder buf = new StringBuilder("failure acquiring lock:
fqn=").append(getFqn()).append(", caller=").append(caller).
append(", lock=").append(toString(true));
if (trace)
{
@@ -509,7 +509,7 @@
}
catch (TimeoutException e)
{
- StringBuffer buf = new StringBuffer("failure acquiring lock:
fqn=").append(getFqn()).append(", caller=").append(caller).
+ StringBuilder buf = new StringBuilder("failure acquiring lock:
fqn=").append(getFqn()).append(", caller=").append(caller).
append(", lock=").append(toString(true));
if (trace)
{
@@ -558,7 +558,7 @@
release(owner);
}
- private void printIndent(StringBuffer sb, int indent)
+ private void printIndent(StringBuilder sb, int indent)
{
if (sb != null)
{
@@ -569,7 +569,7 @@
}
}
- public void printLockInfo(StringBuffer sb, int indent)
+ public void printLockInfo(StringBuilder sb, int indent)
{
boolean locked = isLocked();
Modified: core/branches/2.2.X/src/main/java/org/jboss/cache/lock/LockMap.java
===================================================================
--- core/branches/2.2.X/src/main/java/org/jboss/cache/lock/LockMap.java 2008-06-26
22:56:53 UTC (rev 6072)
+++ core/branches/2.2.X/src/main/java/org/jboss/cache/lock/LockMap.java 2008-06-26
22:58:07 UTC (rev 6073)
@@ -187,7 +187,7 @@
*/
public String printInfo()
{
- StringBuffer buf = new StringBuffer(64);
+ StringBuilder buf = new StringBuilder(64);
buf.append("Read lock owners:
").append(readOwners).append('\n');
buf.append("Write lock owner:
").append(writeOwner_).append('\n');
return buf.toString();
Modified:
core/branches/2.2.X/src/main/java/org/jboss/cache/lock/NodeBasedLockManager.java
===================================================================
---
core/branches/2.2.X/src/main/java/org/jboss/cache/lock/NodeBasedLockManager.java 2008-06-26
22:56:53 UTC (rev 6072)
+++
core/branches/2.2.X/src/main/java/org/jboss/cache/lock/NodeBasedLockManager.java 2008-06-26
22:58:07 UTC (rev 6073)
@@ -311,7 +311,7 @@
public String printLockInfo(NodeSPI node)
{
- StringBuffer sb = new StringBuffer("\n");
+ StringBuilder sb = new StringBuilder("\n");
int indent = 0;
for (Object n : node.getChildrenDirect())
Modified: core/branches/2.2.X/src/main/java/org/jboss/cache/lock/NodeLock.java
===================================================================
--- core/branches/2.2.X/src/main/java/org/jboss/cache/lock/NodeLock.java 2008-06-26
22:56:53 UTC (rev 6072)
+++ core/branches/2.2.X/src/main/java/org/jboss/cache/lock/NodeLock.java 2008-06-26
22:58:07 UTC (rev 6073)
@@ -120,6 +120,6 @@
Set<NodeLock> acquireAll(Object caller, long timeout, LockType lock_type,
boolean excludeInternalFqns) throws LockingException, TimeoutException,
InterruptedException;
- void printLockInfo(StringBuffer sb, int indent);
+ void printLockInfo(StringBuilder sb, int indent);
}
\ No newline at end of file
Modified:
core/branches/2.2.X/src/main/java/org/jboss/cache/lock/PessimisticNodeBasedLockManager.java
===================================================================
---
core/branches/2.2.X/src/main/java/org/jboss/cache/lock/PessimisticNodeBasedLockManager.java 2008-06-26
22:56:53 UTC (rev 6072)
+++
core/branches/2.2.X/src/main/java/org/jboss/cache/lock/PessimisticNodeBasedLockManager.java 2008-06-26
22:58:07 UTC (rev 6073)
@@ -193,7 +193,7 @@
}
if (!fqn.isChildOrEquals(currentNode.getFqn())) // Does this ever happen?
Perhaps with a move(), I suppose? - MS
{
- String message = new StringBuffer("currentNode instance changed the
FQN(").append(currentNode.getFqn())
+ String message = new StringBuilder("currentNode instance changed the
FQN(").append(currentNode.getFqn())
.append(") and do not match the FQN on which we want to acquire
lock(").append(fqn).append(")").toString();
log.trace(message);
throw new LockingException(message);
Modified:
core/branches/2.2.X/src/main/java/org/jboss/cache/lock/ReadWriteLockWithUpgrade.java
===================================================================
---
core/branches/2.2.X/src/main/java/org/jboss/cache/lock/ReadWriteLockWithUpgrade.java 2008-06-26
22:56:53 UTC (rev 6072)
+++
core/branches/2.2.X/src/main/java/org/jboss/cache/lock/ReadWriteLockWithUpgrade.java 2008-06-26
22:58:07 UTC (rev 6073)
@@ -70,7 +70,7 @@
@Override
public String toString()
{
- StringBuffer sb = new StringBuffer();
+ StringBuilder sb = new StringBuilder();
sb.append("activeReaders=").append(activeReaders_).append(",
activeWriter=").append(activeWriter_);
sb.append(", waitingReaders=").append(waitingReaders_).append(",
waitingWriters=").append(waitingWriters_);
sb.append(", waitingUpgrader=").append(waitingUpgrader_);
Modified: core/branches/2.2.X/src/main/java/org/jboss/cache/marshall/MethodCall.java
===================================================================
--- core/branches/2.2.X/src/main/java/org/jboss/cache/marshall/MethodCall.java 2008-06-26
22:56:53 UTC (rev 6072)
+++ core/branches/2.2.X/src/main/java/org/jboss/cache/marshall/MethodCall.java 2008-06-26
22:58:07 UTC (rev 6073)
@@ -89,7 +89,7 @@
@Override
public String toString()
{
- StringBuffer ret = new StringBuffer();
+ StringBuilder ret = new StringBuilder();
ret.append("MethodName: ");
ret.append(method_name);
ret.append("; MethodIdInteger: ");
Modified:
core/branches/2.2.X/src/main/java/org/jboss/cache/optimistic/WorkspaceNodeImpl.java
===================================================================
---
core/branches/2.2.X/src/main/java/org/jboss/cache/optimistic/WorkspaceNodeImpl.java 2008-06-26
22:56:53 UTC (rev 6072)
+++
core/branches/2.2.X/src/main/java/org/jboss/cache/optimistic/WorkspaceNodeImpl.java 2008-06-26
22:58:07 UTC (rev 6073)
@@ -331,7 +331,7 @@
@Override
public String toString()
{
- StringBuffer sb = new StringBuffer();
+ StringBuilder sb = new StringBuilder();
if (isDeleted()) sb.append("del ");
if (isModified()) sb.append("modified ");
if (isCreated()) sb.append("new ");
Modified: core/branches/2.2.X/src/main/java/org/jboss/cache/util/CachePrinter.java
===================================================================
--- core/branches/2.2.X/src/main/java/org/jboss/cache/util/CachePrinter.java 2008-06-26
22:56:53 UTC (rev 6072)
+++ core/branches/2.2.X/src/main/java/org/jboss/cache/util/CachePrinter.java 2008-06-26
22:58:07 UTC (rev 6073)
@@ -59,7 +59,7 @@
public static String printInterceptorChain(CommandInterceptor i)
{
- StringBuffer sb = new StringBuffer();
+ StringBuilder sb = new StringBuilder();
if (i != null)
{
if (i.getNext() != null)
Modified: core/branches/2.2.X/src/main/java/org/jboss/cache/xml/XmlHelper.java
===================================================================
--- core/branches/2.2.X/src/main/java/org/jboss/cache/xml/XmlHelper.java 2008-06-26
22:56:53 UTC (rev 6072)
+++ core/branches/2.2.X/src/main/java/org/jboss/cache/xml/XmlHelper.java 2008-06-26
22:58:07 UTC (rev 6073)
@@ -250,7 +250,7 @@
*/
public static String escapeBackslashes(String value)
{
- StringBuffer buf = new StringBuffer(value);
+ StringBuilder buf = new StringBuilder(value);
for (int looper = 0; looper < buf.length(); looper++)
{
char curr = buf.charAt(looper);
Modified: core/branches/2.2.X/src/test/java/org/jboss/cache/lock/IdentityLockTest.java
===================================================================
---
core/branches/2.2.X/src/test/java/org/jboss/cache/lock/IdentityLockTest.java 2008-06-26
22:56:53 UTC (rev 6072)
+++
core/branches/2.2.X/src/test/java/org/jboss/cache/lock/IdentityLockTest.java 2008-06-26
22:58:07 UTC (rev 6073)
@@ -10,8 +10,8 @@
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.jboss.cache.NodeSPI;
+import org.jboss.cache.transaction.GlobalTransaction;
import org.jboss.cache.util.TestingUtil;
-import org.jboss.cache.transaction.GlobalTransaction;
import static org.testng.AssertJUnit.*;
import org.testng.annotations.AfterMethod;
import org.testng.annotations.BeforeMethod;
@@ -567,7 +567,7 @@
}
try
{
- iLock.toString(new StringBuffer(), false);
+ iLock.toString(new StringBuilder(), false);
}
catch (Exception e)
{
Modified: core/branches/2.2.X/src/test/java/org/jboss/cache/marshall/data/Debug.java
===================================================================
--- core/branches/2.2.X/src/test/java/org/jboss/cache/marshall/data/Debug.java 2008-06-26
22:56:53 UTC (rev 6072)
+++ core/branches/2.2.X/src/test/java/org/jboss/cache/marshall/data/Debug.java 2008-06-26
22:58:07 UTC (rev 6073)
@@ -19,13 +19,13 @@
* @param clazz the Class
* @param results the buffer to write the info to
*/
- public static void displayClassInfo(Class clazz, StringBuffer results)
+ public static void displayClassInfo(Class clazz, StringBuilder results)
{
displayClassInfo(clazz, results, true);
}
@SuppressWarnings("null")
- public static void displayClassInfo(Class clazz, StringBuffer results,
+ public static void displayClassInfo(Class clazz, StringBuilder results,
boolean showParentClassLoaders)
{
@@ -37,7 +37,7 @@
results.append("\n.." + parent);
URL[] urls = getClassLoaderURLs(parent);
int length = urls != null ? urls.length : 0;
- for (int u = 0; u < length; u ++)
+ for (int u = 0; u < length; u++)
{
results.append("\n...." + urls[u]);
}
@@ -59,7 +59,7 @@
results.append("\nImplemented Interfaces:");
Class[] ifaces = clazz.getInterfaces();
- for (int i = 0; i < ifaces.length; i ++)
+ for (int i = 0; i < ifaces.length; i++)
{
Class iface = ifaces[i];
results.append("\n++" + iface + "(" +
Integer.toHexString(iface.hashCode()) + ")");
Modified: core/branches/2.2.X/src/test/java/org/jboss/cache/marshall/data/Person.java
===================================================================
--- core/branches/2.2.X/src/test/java/org/jboss/cache/marshall/data/Person.java 2008-06-26
22:56:53 UTC (rev 6072)
+++ core/branches/2.2.X/src/test/java/org/jboss/cache/marshall/data/Person.java 2008-06-26
22:58:07 UTC (rev 6073)
@@ -43,7 +43,7 @@
public String toString()
{
- StringBuffer sb = new StringBuffer();
+ StringBuilder sb = new StringBuilder();
sb.append("name=").append(getName()).append(" Address=
").append(address);
return sb.toString();
}
Modified:
core/branches/2.2.X/src/test/java/org/jboss/cache/statetransfer/StateTransferTestBase.java
===================================================================
---
core/branches/2.2.X/src/test/java/org/jboss/cache/statetransfer/StateTransferTestBase.java 2008-06-26
22:56:53 UTC (rev 6072)
+++
core/branches/2.2.X/src/test/java/org/jboss/cache/statetransfer/StateTransferTestBase.java 2008-06-26
22:58:07 UTC (rev 6073)
@@ -27,13 +27,13 @@
import org.jboss.cache.DefaultCacheFactory;
import org.jboss.cache.Fqn;
import org.jboss.cache.Region;
-import org.jboss.cache.util.TestingUtil;
import org.jboss.cache.config.Configuration;
import org.jboss.cache.config.Configuration.CacheMode;
import org.jboss.cache.factories.UnitTestCacheConfigurationFactory;
import org.jboss.cache.loader.AbstractCacheLoaderTestBase;
import org.jboss.cache.loader.CacheLoader;
import org.jboss.cache.marshall.SelectedClassnameClassLoader;
+import org.jboss.cache.util.TestingUtil;
import static org.testng.AssertJUnit.assertEquals;
import static org.testng.AssertJUnit.assertFalse;
import org.testng.annotations.AfterMethod;
@@ -307,7 +307,7 @@
}
char[] chars = path.toCharArray();
- StringBuffer sb = new StringBuffer();
+ StringBuilder sb = new StringBuilder();
for (char aChar : chars)
{
if (aChar == '\\')
@@ -394,7 +394,7 @@
protected ClassLoader getClassLoader() throws Exception
{
String[] includesClasses = {"org.jboss.cache.marshall.Person",
- "org.jboss.cache.marshall.Address"};
+ "org.jboss.cache.marshall.Address"};
String[] excludesClasses = {};
ClassLoader cl = Thread.currentThread().getContextClassLoader();
return new SelectedClassnameClassLoader(includesClasses, excludesClasses, cl);
@@ -403,7 +403,7 @@
protected ClassLoader getNotFoundClassLoader() throws Exception
{
String[] notFoundClasses = {"org.jboss.cache.marshall.Person",
- "org.jboss.cache.marshall.Address"};
+ "org.jboss.cache.marshall.Address"};
ClassLoader cl = Thread.currentThread().getContextClassLoader();
return new SelectedClassnameClassLoader(null, null, notFoundClasses, cl);
}
Modified: core/branches/2.2.X/src/test/java/org/jboss/cache/util/TestingUtil.java
===================================================================
--- core/branches/2.2.X/src/test/java/org/jboss/cache/util/TestingUtil.java 2008-06-26
22:56:53 UTC (rev 6072)
+++ core/branches/2.2.X/src/test/java/org/jboss/cache/util/TestingUtil.java 2008-06-26
22:58:07 UTC (rev 6073)
@@ -11,7 +11,6 @@
import org.jboss.cache.CacheSPI;
import org.jboss.cache.CacheStatus;
import org.jboss.cache.Fqn;
-import org.jboss.cache.lock.LockManager;
import org.jboss.cache.commands.VisitableCommand;
import org.jboss.cache.factories.CommandsFactory;
import org.jboss.cache.factories.ComponentRegistry;
@@ -20,7 +19,7 @@
import org.jboss.cache.invocation.CacheInvocationDelegate;
import org.jboss.cache.loader.CacheLoader;
import org.jboss.cache.loader.CacheLoaderManager;
-import org.jboss.cache.util.CachePrinter;
+import org.jboss.cache.lock.LockManager;
import org.jgroups.JChannel;
import java.io.File;
@@ -293,7 +292,7 @@
else if (memberCount < members.size())
{
// This is an exceptional condition
- StringBuffer sb = new StringBuffer("Cache at address ");
+ StringBuilder sb = new StringBuilder("Cache at address ");
sb.append(cache.getRPCManager().getLocalAddress());
sb.append(" had ");
sb.append(members.size());
@@ -338,7 +337,7 @@
if (barfIfTooManyMembers)
{
// This is an exceptional condition
- StringBuffer sb = new StringBuffer("Cache at address ");
+ StringBuilder sb = new StringBuilder("Cache at address ");
sb.append(cache.getLocalAddress());
sb.append(" had ");
sb.append(members.size());