jetty-9 some findbug cleanups
This commit is contained in:
parent
7e8a627b92
commit
dc02390449
|
@ -165,10 +165,11 @@ public class AsyncByteArrayEndPoint extends ByteArrayEndPoint implements AsyncEn
|
|||
_readFuture.fail(new TimeoutException());
|
||||
if (!_writeFuture.isComplete())
|
||||
_writeFuture.fail(new TimeoutException());
|
||||
|
||||
notIdle();
|
||||
}
|
||||
finally
|
||||
{
|
||||
notIdle();
|
||||
_lock.unlock();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -25,7 +25,7 @@ import java.nio.ByteBuffer;
|
|||
*/
|
||||
public interface Buffers
|
||||
{
|
||||
enum Type { DIRECT, INDIRECT } ;
|
||||
enum Type { DIRECT, INDIRECT }
|
||||
|
||||
ByteBuffer getHeader();
|
||||
ByteBuffer getBuffer();
|
||||
|
|
|
@ -28,16 +28,12 @@ public class DispatchedIOFuture implements IOFuture
|
|||
|
||||
public DispatchedIOFuture()
|
||||
{
|
||||
// System.err.println(this);new Throwable().printStackTrace();
|
||||
_lock = new ReentrantLock();
|
||||
_block = _lock.newCondition();
|
||||
this(false,new ReentrantLock());
|
||||
}
|
||||
|
||||
public DispatchedIOFuture(Lock lock)
|
||||
{
|
||||
// System.err.println(this);new Throwable().printStackTrace();
|
||||
_lock = lock;
|
||||
_block = _lock.newCondition();
|
||||
this(false,lock);
|
||||
}
|
||||
|
||||
public DispatchedIOFuture(boolean ready,Lock lock)
|
||||
|
@ -209,7 +205,7 @@ public class DispatchedIOFuture implements IOFuture
|
|||
|
||||
protected void dispatch(Runnable callback)
|
||||
{
|
||||
new Thread(callback).run();
|
||||
new Thread(callback).start();
|
||||
}
|
||||
|
||||
private void dispatchReady()
|
||||
|
|
|
@ -195,10 +195,10 @@ public class SelectChannelEndPoint extends ChannelEndPoint implements AsyncEndPo
|
|||
_readFuture.fail(new TimeoutException());
|
||||
if (!_writeFuture.isComplete())
|
||||
_writeFuture.fail(new TimeoutException());
|
||||
notIdle();
|
||||
}
|
||||
finally
|
||||
{
|
||||
notIdle();
|
||||
_lock.unlock();
|
||||
}
|
||||
}
|
||||
|
@ -443,15 +443,18 @@ public class SelectChannelEndPoint extends ChannelEndPoint implements AsyncEndPo
|
|||
_lock.lock();
|
||||
try
|
||||
{
|
||||
super.close();
|
||||
}
|
||||
catch (IOException e)
|
||||
{
|
||||
LOG.ignore(e);
|
||||
try
|
||||
{
|
||||
super.close();
|
||||
}
|
||||
catch (IOException e)
|
||||
{
|
||||
LOG.ignore(e);
|
||||
}
|
||||
updateKey();
|
||||
}
|
||||
finally
|
||||
{
|
||||
updateKey();
|
||||
_lock.unlock();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -202,7 +202,7 @@ public class IOFutureTest
|
|||
@Override
|
||||
public void run()
|
||||
{
|
||||
try{TimeUnit.MILLISECONDS.sleep(50);}catch(Exception e){}
|
||||
try{TimeUnit.MILLISECONDS.sleep(50);}catch(Exception e){e.printStackTrace();}
|
||||
f0.ready();
|
||||
}
|
||||
}.start();
|
||||
|
@ -229,7 +229,7 @@ public class IOFutureTest
|
|||
@Override
|
||||
public void run()
|
||||
{
|
||||
try{TimeUnit.MILLISECONDS.sleep(50);}catch(Exception e){}
|
||||
try{TimeUnit.MILLISECONDS.sleep(50);}catch(Exception e){e.printStackTrace();}
|
||||
f1.ready();
|
||||
}
|
||||
}.start();
|
||||
|
@ -285,7 +285,7 @@ public class IOFutureTest
|
|||
@Override
|
||||
public void run()
|
||||
{
|
||||
try{TimeUnit.MILLISECONDS.sleep(50);}catch(Exception e){}
|
||||
try{TimeUnit.MILLISECONDS.sleep(50);}catch(Exception e){e.printStackTrace();}
|
||||
f0.fail(ex);
|
||||
}
|
||||
}.start();
|
||||
|
@ -328,7 +328,7 @@ public class IOFutureTest
|
|||
@Override
|
||||
public void run()
|
||||
{
|
||||
try{TimeUnit.MILLISECONDS.sleep(50);}catch(Exception e){}
|
||||
try{TimeUnit.MILLISECONDS.sleep(50);}catch(Exception e){e.printStackTrace();}
|
||||
f1.fail(ex);
|
||||
}
|
||||
}.start();
|
||||
|
|
|
@ -360,7 +360,8 @@ public class SelectChannelEndPointTest
|
|||
clientOutputStream.write("12345678".getBytes("UTF-8"));
|
||||
clientOutputStream.flush();
|
||||
|
||||
while(_lastEndp==null);
|
||||
while(_lastEndp==null)
|
||||
Thread.sleep(10);
|
||||
|
||||
_lastEndp.setMaxIdleTime(10*specifiedTimeout);
|
||||
Thread.sleep(2 * specifiedTimeout);
|
||||
|
|
Loading…
Reference in New Issue