tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r1366885 - in /tomcat/trunk/java/org/apache/catalina/tribes/io: BufferPool.java BufferPool15Impl.java DirectByteArrayOutputStream.java XByteBuffer.java
Date Sun, 29 Jul 2012 18:26:51 GMT
Author: markt
Date: Sun Jul 29 18:26:51 2012
New Revision: 1366885

URL: http://svn.apache.org/viewvc?rev=1366885&view=rev
Log:
Partial code clean-up for o.a.catalina.tribes
 - Add final prompted by UCDetector
 - Java 7 use of <>

Modified:
    tomcat/trunk/java/org/apache/catalina/tribes/io/BufferPool.java
    tomcat/trunk/java/org/apache/catalina/tribes/io/BufferPool15Impl.java
    tomcat/trunk/java/org/apache/catalina/tribes/io/DirectByteArrayOutputStream.java
    tomcat/trunk/java/org/apache/catalina/tribes/io/XByteBuffer.java

Modified: tomcat/trunk/java/org/apache/catalina/tribes/io/BufferPool.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/tribes/io/BufferPool.java?rev=1366885&r1=1366884&r2=1366885&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/tribes/io/BufferPool.java (original)
+++ tomcat/trunk/java/org/apache/catalina/tribes/io/BufferPool.java Sun Jul 29 18:26:51 2012
@@ -34,7 +34,7 @@ public class BufferPool {
 
 
     protected static volatile BufferPool instance = null;
-    protected BufferPoolAPI pool = null;
+    protected final BufferPoolAPI pool;
 
     private BufferPool(BufferPoolAPI pool) {
         this.pool = pool;

Modified: tomcat/trunk/java/org/apache/catalina/tribes/io/BufferPool15Impl.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/tribes/io/BufferPool15Impl.java?rev=1366885&r1=1366884&r2=1366885&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/tribes/io/BufferPool15Impl.java (original)
+++ tomcat/trunk/java/org/apache/catalina/tribes/io/BufferPool15Impl.java Sun Jul 29 18:26:51
2012
@@ -26,8 +26,9 @@ import java.util.concurrent.atomic.Atomi
  */
 class BufferPool15Impl implements BufferPool.BufferPoolAPI {
     protected int maxSize;
-    protected AtomicInteger size = new AtomicInteger(0);
-    protected ConcurrentLinkedQueue<XByteBuffer> queue = new ConcurrentLinkedQueue<XByteBuffer>();
+    protected final AtomicInteger size = new AtomicInteger(0);
+    protected final ConcurrentLinkedQueue<XByteBuffer> queue =
+            new ConcurrentLinkedQueue<>();
 
     @Override
     public void setMaxSize(int bytes) {

Modified: tomcat/trunk/java/org/apache/catalina/tribes/io/DirectByteArrayOutputStream.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/tribes/io/DirectByteArrayOutputStream.java?rev=1366885&r1=1366884&r2=1366885&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/tribes/io/DirectByteArrayOutputStream.java (original)
+++ tomcat/trunk/java/org/apache/catalina/tribes/io/DirectByteArrayOutputStream.java Sun Jul
29 18:26:51 2012
@@ -28,7 +28,7 @@ import java.io.OutputStream;
  */
 public class DirectByteArrayOutputStream extends OutputStream {
 
-    private XByteBuffer buffer;
+    private final XByteBuffer buffer;
 
     public DirectByteArrayOutputStream(int size) {
         buffer = new XByteBuffer(size,false);

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=1366885&r1=1366884&r2=1366885&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/tribes/io/XByteBuffer.java (original)
+++ tomcat/trunk/java/org/apache/catalina/tribes/io/XByteBuffer.java Sun Jul 29 18:26:51 2012
@@ -554,7 +554,7 @@ public class XByteBuffer
         return deserialize(data,offset,length,null);
     }
 
-    private static AtomicInteger invokecount = new AtomicInteger(0);
+    private static final AtomicInteger invokecount = new AtomicInteger(0);
 
     public static Serializable deserialize(byte[] data, int offset, int length, ClassLoader[]
cls)
         throws IOException, ClassNotFoundException, ClassCastException {



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


Mime
View raw message