logging-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ggreg...@apache.org
Subject svn commit: r1516445 - /logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/net/SocketServer.java
Date Thu, 22 Aug 2013 13:25:17 GMT
Author: ggregory
Date: Thu Aug 22 13:25:16 2013
New Revision: 1516445

URL: http://svn.apache.org/r1516445
Log:
Explicit boxing and use Long cache.

Modified:
    logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/net/SocketServer.java

Modified: logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/net/SocketServer.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/net/SocketServer.java?rev=1516445&r1=1516444&r2=1516445&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/net/SocketServer.java
(original)
+++ logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/net/SocketServer.java
Thu Aug 22 13:25:16 2013
@@ -131,7 +131,7 @@ public class SocketServer extends Abstra
                 // socket has been accepted.
 
                 final SocketHandler handler = new SocketHandler(clientSocket);
-                handlers.put(handler.getId(), handler);
+                handlers.put(Long.valueOf(handler.getId()), handler);
                 handler.start();
             } catch (final IOException ioe) {
                 System.out.println("Exception encountered on accept. Ignoring. Stack Trace
:");
@@ -195,7 +195,7 @@ public class SocketServer extends Abstra
                     }
                 }
             } finally {
-                handlers.remove(getId());
+                handlers.remove(Long.valueOf(getId()));
             }
         }
     }



Mime
View raw message