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
This commit is contained in:
Simone Bordet 2011-02-09 10:18:58 +00:00
parent 51d0e347e7
commit 41b6a9422c
2 changed files with 5 additions and 14 deletions

View File

@ -1,5 +1,5 @@
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)

View File

@ -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
{