tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r1383926 - in /tomcat/trunk: java/org/apache/tomcat/jni/socket/AprSocketContext.java java/org/apache/tomcat/spdy/SpdyConnection.java modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/DisposableConnectionFacade.java
Date Wed, 12 Sep 2012 13:21:14 GMT
Author: markt
Date: Wed Sep 12 13:21:13 2012
New Revision: 1383926

URL: http://svn.apache.org/viewvc?rev=1383926&view=rev
Log:
Clean-up - autoboxing

Modified:
    tomcat/trunk/java/org/apache/tomcat/jni/socket/AprSocketContext.java
    tomcat/trunk/java/org/apache/tomcat/spdy/SpdyConnection.java
    tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/DisposableConnectionFacade.java

Modified: tomcat/trunk/java/org/apache/tomcat/jni/socket/AprSocketContext.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/jni/socket/AprSocketContext.java?rev=1383926&r1=1383925&r2=1383926&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/jni/socket/AprSocketContext.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/jni/socket/AprSocketContext.java Wed Sep 12 13:21:13
2012
@@ -1023,7 +1023,7 @@ public class AprSocketContext {
                             boolean blocking = false;
 
                             synchronized (channels) {
-                                ch = channels.get(sock);
+                                ch = channels.get(Long.valueOf(sock));
                                 if (ch != null) {
                                     blocking = ch.isBlocking();
                                 } else {
@@ -1255,7 +1255,7 @@ public class AprSocketContext {
                 if (ch.isClosed()) {
                     synchronized (channels) {
                         ch.poller = null;
-                        channels.remove(ch.socket);
+                        channels.remove(Long.valueOf(ch.socket));
                     }
                     keepAliveCount.decrementAndGet();
                     ch.reset();
@@ -1289,7 +1289,7 @@ public class AprSocketContext {
                     failed = true;
                 } else {
                     polledCount.incrementAndGet();
-                    channels.put(up.socket, up);
+                    channels.put(Long.valueOf(up.socket), up);
                     up.setStatus(AprSocket.POLL);
                 }
             }

Modified: tomcat/trunk/java/org/apache/tomcat/spdy/SpdyConnection.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/spdy/SpdyConnection.java?rev=1383926&r1=1383925&r2=1383926&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/spdy/SpdyConnection.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/spdy/SpdyConnection.java Wed Sep 12 13:21:13 2012
@@ -246,7 +246,8 @@ public abstract class SpdyConnection { /
                         out.streamId = outStreamId;
                         outStreamId += 2;
                         synchronized(channels) {
-                            channels.put(out.streamId, out.stream);
+                            channels.put(Integer.valueOf(out.streamId),
+                                    out.stream);
                         }
                     }
 
@@ -286,7 +287,7 @@ public abstract class SpdyConnection { /
                             out.stream.finSent = true;
                         }
                         if (out.stream.finRcvd && out.stream.finSent) {
-                            channels.remove(out.streamId);
+                            channels.remove(Integer.valueOf(out.streamId));
                         }
                     }
                 }
@@ -525,7 +526,7 @@ public abstract class SpdyConnection { /
 
         List<Integer> ch = new ArrayList<>(channels.keySet());
         for (Integer i: ch) {
-            if (i > last) {
+            if (i.intValue() > last) {
                 SpdyStream stream = channels.remove(i);
                 if (stream != null) {
                     stream.onReset();
@@ -571,11 +572,12 @@ public abstract class SpdyConnection { /
                             + inFrame.streamId
                             + " "
                             + ((errCode < RST_ERRORS.length) ? RST_ERRORS[errCode]
-                                    : errCode));
+                                    : Integer.valueOf(errCode)));
                 }
                 SpdyStream sch;
                 synchronized(channels) {
-                        sch = channels.remove(inFrame.streamId);
+                        sch = channels.remove(
+                                Integer.valueOf(inFrame.streamId));
                 }
                 // if RST stream is for a closed channel - we can ignore.
                 if (sch != null) {
@@ -590,7 +592,7 @@ public abstract class SpdyConnection { /
                 SpdyStream ch = getSpdyContext().getStream(this);
 
                 synchronized (channels) {
-                    channels.put(inFrame.streamId, ch);
+                    channels.put(Integer.valueOf(inFrame.streamId), ch);
                 }
 
                 try {
@@ -607,7 +609,7 @@ public abstract class SpdyConnection { /
             case TYPE_SYN_REPLY: {
                 SpdyStream sch;
                 synchronized(channels) {
-                    sch = channels.get(inFrame.streamId);
+                    sch = channels.get(Integer.valueOf(inFrame.streamId));
                 }
                 if (sch == null) {
                     abort("Missing channel");
@@ -640,7 +642,7 @@ public abstract class SpdyConnection { /
             // Data frame
             SpdyStream sch;
             synchronized (channels) {
-                sch = channels.get(inFrame.streamId);
+                sch = channels.get(Integer.valueOf(inFrame.streamId));
             }
             if (sch == null) {
                 abort("Missing channel");
@@ -649,7 +651,7 @@ public abstract class SpdyConnection { /
             sch.onDataFrame(inFrame);
             synchronized (channels) {
                 if (sch.finRcvd && sch.finSent) {
-                    channels.remove(inFrame.streamId);
+                    channels.remove(Integer.valueOf(inFrame.streamId));
                 }
             }
             inFrame = null;

Modified: tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/DisposableConnectionFacade.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/DisposableConnectionFacade.java?rev=1383926&r1=1383925&r2=1383926&view=diff
==============================================================================
--- tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/DisposableConnectionFacade.java
(original)
+++ tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/DisposableConnectionFacade.java
Wed Sep 12 13:21:13 2012
@@ -61,9 +61,10 @@ public class DisposableConnectionFacade 
     public Object invoke(Object proxy, Method method, Object[] args)
             throws Throwable {
         if (compare(EQUALS_VAL, method)) {
-            return this.equals(Proxy.getInvocationHandler(args[0]));
+            return Boolean.valueOf(
+                    this.equals(Proxy.getInvocationHandler(args[0])));
         } else if (compare(HASHCODE_VAL, method)) {
-            return this.hashCode();
+            return Integer.valueOf(this.hashCode());
         } else if (getNext()==null) {
             if (compare(ISCLOSED_VAL, method)) {
                 return Boolean.TRUE;



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


Mime
View raw message