diff --git a/VERSION.txt b/VERSION.txt index 809568205e1..109c12c9ebf 100644 --- a/VERSION.txt +++ b/VERSION.txt @@ -18,6 +18,7 @@ jetty-7.4.3-SNAPSHOT + 349997 MBeanContainer uses weak references + 350533 Add "Origin" to the list of allowed headers in CrossOriginFilter + 350634 Cleanup FileResource construction + + 350642 Don't close SCEP during NIOBuffer manipulation + JETTY-1342 Recreate selector in change task + JETTY-1390 RewriteHandler handles encoded URIs 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 707b67d06ae..6bb102cd4de 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 @@ -154,49 +154,38 @@ public class ChannelEndPoint implements EndPoint final NIOBuffer nbuf = (NIOBuffer)buf; final ByteBuffer bbuf=nbuf.getByteBuffer(); //noinspection SynchronizationOnLocalVariableOrMethodParameter - synchronized(bbuf) + + try { - try - { - bbuf.position(buffer.putIndex()); - len=_channel.read(bbuf); - if (len<0 && isOpen() && !isInputShutdown()) - { - try - { - shutdownInput(); - } - catch(IOException x) - { - Log.ignore(x); - try - { - close(); - } - catch (IOException xx) - { - Log.ignore(xx); - } - } - } - } - catch (IOException x) + synchronized(bbuf) { try { - close(); + bbuf.position(buffer.putIndex()); + len=_channel.read(bbuf); } - catch (IOException xx) + finally { - Log.ignore(xx); + buffer.setPutIndex(bbuf.position()); + bbuf.position(0); } - throw x; } - finally + + if (len<0 && isOpen() && !isInputShutdown()) + shutdownInput(); + } + + catch (IOException x) + { + try { - buffer.setPutIndex(bbuf.position()); - bbuf.position(0); + close(); } + catch (IOException xx) + { + Log.ignore(xx); + } + throw x; } } else