From 41b6a9422ce3352ac2f758300c87b0ba310793df Mon Sep 17 00:00:00 2001 From: Simone Bordet Date: Wed, 9 Feb 2011 10:18:58 +0000 Subject: [PATCH] Fixes #336691 (Possible wrong length returned by ChannelEndPoint.flush() in case of RandomAccessFileBuffer). git-svn-id: svn+ssh://dev.eclipse.org/svnroot/rt/org.eclipse.jetty/jetty/trunk@2750 7e9141cc-0065-0410-87d8-b60c137991c4 --- VERSION.txt | 6 +++--- .../org/eclipse/jetty/io/nio/ChannelEndPoint.java | 13 ++----------- 2 files changed, 5 insertions(+), 14 deletions(-) diff --git a/VERSION.txt b/VERSION.txt index 37c19475773..95b7bcac423 100644 --- a/VERSION.txt +++ b/VERSION.txt @@ -1,5 +1,5 @@ -jetty-7.3.1-SNAPSHOT - +jetty-7.3.1-SNAPSHOT + + 336691 Possible wrong length returned by ChannelEndPoint.flush() in case of RandomAccessFileBuffer jetty-7.3.0.v20110203 3 February 2011 + JETTY-1259 NullPointerException in JDBCSessionIdManager when invalidating session (further update) @@ -34,7 +34,7 @@ jetty-7.3.0.v20110203 3 February 2011 + 335361 Fixed 'jetty.sh check' to show current PID when JETTY_PID env. variable is set + 335641 Cleaned up dispatch handling to avoid key.interestOps==0 when undispatched + 335681 Improve ChannelEndPoint.close() to avoid spinning - + 335836 Race when updating SelectChannelEndPoint._dispatched + + 335836 Race when updating SelectChannelEndPoint._dispatched jetty-7.2.2.v20101205 5 December 2010 + JETTY-1308 327109 (re)fixed AJP handling of empty packets diff --git a/jetty-io/src/main/java/org/eclipse/jetty/io/nio/ChannelEndPoint.java b/jetty-io/src/main/java/org/eclipse/jetty/io/nio/ChannelEndPoint.java index 734b66abde4..2c9cc68bee2 100644 --- a/jetty-io/src/main/java/org/eclipse/jetty/io/nio/ChannelEndPoint.java +++ b/jetty-io/src/main/java/org/eclipse/jetty/io/nio/ChannelEndPoint.java @@ -41,9 +41,6 @@ public class ChannelEndPoint implements EndPoint protected final InetSocketAddress _remote; protected int _maxIdleTime; - /** - * - */ public ChannelEndPoint(ByteChannel channel) throws IOException { super(); @@ -61,9 +58,6 @@ public class ChannelEndPoint implements EndPoint } } - /** - * - */ protected ChannelEndPoint(ByteChannel channel, int maxIdleTime) throws IOException { this._channel = channel; @@ -79,7 +73,6 @@ public class ChannelEndPoint implements EndPoint { _local=_remote=null; } - } public boolean isBlocking() @@ -156,7 +149,7 @@ public class ChannelEndPoint implements EndPoint bbuf.position(buffer.putIndex()); len=_channel.read(bbuf); if (len<0) - _channel.close(); + close(); } finally { @@ -205,8 +198,7 @@ public class ChannelEndPoint implements EndPoint } else if (buf instanceof RandomAccessFileBuffer) { - len = buffer.length(); - ((RandomAccessFileBuffer)buf).writeTo(_channel,buffer.getIndex(),buffer.length()); + len = ((RandomAccessFileBuffer)buf).writeTo(_channel,buffer.getIndex(),buffer.length()); if (len>0) buffer.skip(len); } @@ -276,7 +268,6 @@ public class ChannelEndPoint implements EndPoint { header.skip(length); } - } finally {