forked from I2P_Developers/i2p.i2p
* Replace size() <= 0 with isEmpty() everywhere, ditto > 0 -> !isEmpty()
This commit is contained in:
@@ -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?
|
||||
|
@@ -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;
|
||||
}
|
||||
|
@@ -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 );
|
||||
|
Reference in New Issue
Block a user