prefer isEmpty over length() == 0

This commit is contained in:
thatsIch
2015-09-25 23:18:27 +02:00
parent 430b33b7a3
commit 2d71b0e34a
12 changed files with 15 additions and 15 deletions
@@ -178,7 +178,7 @@ public final class InscriberRegistry implements IInscriberRegistry
{
throw new IllegalStateException( "Input must be defined." );
}
if( this.inputs.size() == 0 )
if( this.inputs.isEmpty() )
{
throw new IllegalStateException( "Input must have a size." );
}
@@ -94,7 +94,7 @@ public final class WirelessRegistry implements IWirelessTermRegistry
final IWirelessTermHandler handler = this.getWirelessTerminalHandler( item );
final String unparsedKey = handler.getEncryptionKey( item );
if( unparsedKey.length() == 0 )
if( unparsedKey.isEmpty() )
{
player.addChatMessage( PlayerMessages.DeviceNotLinked.get() );
return;