You are viewing a plain text version of this content. The canonical link for it is here.
Posted to scm@geronimo.apache.org by jg...@apache.org on 2006/10/10 14:12:53 UTC
svn commit: r454719 -
/geronimo/sandbox/gcache/server/src/main/java/org/apache/geronimo/gcache/transports/tcp/DefaultSelectionKeyProcessor.java
Author: jgenender
Date: Tue Oct 10 05:12:52 2006
New Revision: 454719
URL: http://svn.apache.org/viewvc?view=rev&rev=454719
Log:
Clean up code add log debugging
Modified:
geronimo/sandbox/gcache/server/src/main/java/org/apache/geronimo/gcache/transports/tcp/DefaultSelectionKeyProcessor.java
Modified: geronimo/sandbox/gcache/server/src/main/java/org/apache/geronimo/gcache/transports/tcp/DefaultSelectionKeyProcessor.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/gcache/server/src/main/java/org/apache/geronimo/gcache/transports/tcp/DefaultSelectionKeyProcessor.java?view=diff&rev=454719&r1=454718&r2=454719
==============================================================================
--- geronimo/sandbox/gcache/server/src/main/java/org/apache/geronimo/gcache/transports/tcp/DefaultSelectionKeyProcessor.java (original)
+++ geronimo/sandbox/gcache/server/src/main/java/org/apache/geronimo/gcache/transports/tcp/DefaultSelectionKeyProcessor.java Tue Oct 10 05:12:52 2006
@@ -99,9 +99,7 @@
if (!Arrays.equals(Constants.MAGIC, magic)) {
// Magic doesn't match, so close the socket
- if (log.isDebugEnabled()) {
- log.debug("Magic did not match...disconnecting client.");
- }
+ log.debug("Magic did not match...disconnecting client.");
infoHolder.getEndpointManager().removeEndpoint(
new TCPEndpoint(channel));
@@ -109,9 +107,7 @@
return;
}
- if (log.isDebugEnabled()) {
- log.debug("Magic found");
- }
+ log.debug("Magic found");
// Get the command
byte commandIdentifier = buffer.get();
@@ -136,9 +132,8 @@
bcr.reset(channel, commandBuffer);
count = bcr.readBuffer(length);
if (count < 0) {
- if (log.isDebugEnabled()) {
- log.debug("Client disconnected...removing endpoint.");
- }
+ log.debug("Client disconnected...removing endpoint.");
+
// Remove the endpoint from the list of clients
infoHolder.getEndpointManager().removeEndpoint(
new TCPEndpoint(channel));
@@ -172,9 +167,7 @@
// TODO send a resubmit??
return;
}
- if (log.isDebugEnabled()) {
- log.debug("Checksums matched.");
- }
+ log.debug("Checksums matched.");
ByteArrayInputStream bias = new ByteArrayInputStream(commandBuffer
.array());