prefer isEmpty over length() == 0
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user