Author: fhanik Date: Tue Feb 12 07:03:29 2008 New Revision: 620821 URL: http://svn.apache.org/viewvc?rev=620821&view=rev Log: remove not needed synchronization
Modified: tomcat/trunk/java/org/apache/catalina/tribes/io/XByteBuffer.java Modified: tomcat/trunk/java/org/apache/catalina/tribes/io/XByteBuffer.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/tribes/io/XByteBuffer.java?rev=620821&r1=620820&r2=620821&view=diff ============================================================================== --- tomcat/trunk/java/org/apache/catalina/tribes/io/XByteBuffer.java (original) +++ tomcat/trunk/java/org/apache/catalina/tribes/io/XByteBuffer.java Tue Feb 12 07:03:29 2008 @@ -25,6 +25,7 @@ import java.io.ObjectOutputStream; import java.io.Serializable; import java.nio.ByteBuffer; +import java.util.concurrent.atomic.AtomicInteger; /** * The XByteBuffer provides a dual functionality. @@ -562,10 +563,10 @@ throws IOException, ClassNotFoundException, ClassCastException { return deserialize(data,offset,length,null); } - public static int invokecount = 0; + public static AtomicInteger invokecount = new AtomicInteger(0); public static Serializable deserialize(byte[] data, int offset, int length, ClassLoader[] cls) throws IOException, ClassNotFoundException, ClassCastException { - synchronized (XByteBuffer.class) { invokecount++;} + invokecount.addAndGet(1); Object message = null; if ( cls == null ) cls = new ClassLoader[0]; if (data != null) { --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]