1
0
mirror of https://github.com/jetty/jetty.project.git synced 2025-02-13 10:04:47 +00:00

jetty-9 EndPoint.close does not throw

This commit is contained in:
Greg Wilkins 2012-05-08 15:46:41 +02:00
parent 6d64bcd38a
commit 98e85ecb41
7 changed files with 19 additions and 27 deletions

@ -42,15 +42,7 @@ public abstract class AbstractAsyncConnection
catch(IOException e)
{
LOG.ignore(e);
try
{
_endp.close();
}
catch(IOException e2)
{
LOG.ignore(e2);
}
_endp.close();
}
}

@ -220,7 +220,7 @@ public class ByteArrayEndPoint extends AbstractEndPoint
* @see org.eclipse.io.EndPoint#close()
*/
@Override
public void close() throws IOException
public void close()
{
_closed=true;
}

@ -121,10 +121,18 @@ public class ChannelEndPoint extends AbstractEndPoint
* @see org.eclipse.io.EndPoint#close()
*/
@Override
public void close() throws IOException
public void close()
{
LOG.debug("close {}",this);
_channel.close();
try
{
LOG.debug("close {}",this);
_channel.close();
}
catch(IOException e)
{
LOG.warn(e.toString());
LOG.debug(e);
}
}
/* (non-Javadoc)

@ -79,7 +79,7 @@ public interface EndPoint
/**
* Close any backing stream associated with the endpoint
*/
void close() throws IOException;
void close();
/**
* Fill the passed buffer with data from this endpoint. The bytes are appended to any

@ -438,7 +438,7 @@ public class SelectChannelEndPoint extends ChannelEndPoint implements AsyncEndPo
* @see org.eclipse.io.nio.ChannelEndPoint#close()
*/
@Override
public void close() throws IOException
public void close()
{
_lock.lock();
try
@ -447,11 +447,10 @@ public class SelectChannelEndPoint extends ChannelEndPoint implements AsyncEndPo
{
super.close();
}
catch (IOException e)
finally
{
LOG.ignore(e);
updateKey();
}
updateKey();
}
finally
{

@ -880,14 +880,7 @@ public abstract class SelectorManager extends AbstractLifeCycle implements Dumpa
if (att instanceof EndPoint)
{
EndPoint endpoint = (EndPoint)att;
try
{
endpoint.close();
}
catch(IOException e)
{
LOG.ignore(e);
}
endpoint.close();
}
}

@ -613,7 +613,7 @@ public class SslConnection extends AbstractAsyncConnection
}
@Override
public void close() throws IOException
public void close()
{
LOG.debug("{} ssl endp.close",_session);
_endp.close();