* 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

@@ -739,7 +739,7 @@ public class SAMStreamSession {
data = null;
try {
synchronized (_data) {
if (_data.size() > 0) {
if (!_data.isEmpty()) {
data = (ByteArray)_data.remove(0);
} else if (_shuttingDownGracefully) {
/* No data left and shutting down gracefully?

View File

@@ -308,7 +308,7 @@ public class SAMv1Handler extends SAMHandler implements SAMRawReceiver, SAMDatag
protected boolean execDestMessage(String opcode, Properties props) {
if (opcode.equals("GENERATE")) {
if (props.size() > 0) {
if (!props.isEmpty()) {
_log.debug("Properties specified in DEST GENERATE message");
return false;
}

View File

@@ -371,7 +371,7 @@ public class SAMv2StreamSession extends SAMStreamSession
{
synchronized ( _data )
{
if ( _data.size() > 0 )
if ( !_data.isEmpty() )
{
int formerSize = _dataSize ;
data = ( ByteArray ) _data.remove ( 0 );