tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r1222689 - /tomcat/trunk/java/org/apache/catalina/tribes/group/interceptors/MessageDispatchInterceptor.java
Date Fri, 23 Dec 2011 14:35:30 GMT
Author: markt
Date: Fri Dec 23 14:35:30 2011
New Revision: 1222689

URL: http://svn.apache.org/viewvc?rev=1222689&view=rev
Log:
Fix a couple of Eclipse warnings

Modified:
    tomcat/trunk/java/org/apache/catalina/tribes/group/interceptors/MessageDispatchInterceptor.java

Modified: tomcat/trunk/java/org/apache/catalina/tribes/group/interceptors/MessageDispatchInterceptor.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/tribes/group/interceptors/MessageDispatchInterceptor.java?rev=1222689&r1=1222688&r2=1222689&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/tribes/group/interceptors/MessageDispatchInterceptor.java
(original)
+++ tomcat/trunk/java/org/apache/catalina/tribes/group/interceptors/MessageDispatchInterceptor.java
Fri Dec 23 14:35:30 2011
@@ -130,14 +130,18 @@ public class MessageDispatchInterceptor 
         return currentSize;
     }
 
-    public synchronized long addAndGetCurrentSize(long inc) {
-        currentSize += inc;
-        return currentSize;
+    public long addAndGetCurrentSize(long inc) {
+        synchronized (this) {
+            currentSize += inc;
+            return currentSize;
+        }
     }
 
-    public synchronized long setAndGetCurrentSize(long value) {
-        currentSize = value;
-        return value;
+    public long setAndGetCurrentSize(long value) {
+        synchronized (this) {
+            currentSize = value;
+            return value;
+        }
     }
 
     @Override



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


Mime
View raw message