* Replace size() <= 0 with isEmpty() everywhere, ditto > 0 -> !isEmpty()

This commit is contained in:
zzz
2010-05-05 16:51:54 +00:00
parent 16bec08f09
commit 2baee7413c
90 changed files with 158 additions and 154 deletions

View File

@@ -69,7 +69,7 @@ class I2PServerSocketImpl implements I2PServerSocket {
I2PSocket ret = null;
while ( (ret == null) && (!closing) ){
while (pendingSockets.size() <= 0) {
while (pendingSockets.isEmpty()) {
if (closing) throw new ConnectException("I2PServerSocket closed");
try {
synchronized(socketAddedLock) {
@@ -78,7 +78,7 @@ class I2PServerSocketImpl implements I2PServerSocket {
} catch (InterruptedException ie) {}
}
synchronized (pendingSockets) {
if (pendingSockets.size() > 0) {
if (!pendingSockets.isEmpty()) {
ret = (I2PSocket)pendingSockets.remove(0);
}
}