prefer isEmpty over length() == 0
This commit is contained in:
@@ -82,7 +82,7 @@ public class ApiPart implements IPartHelper
|
||||
|
||||
public Class getCombinedInstance( String base )
|
||||
{
|
||||
if( this.desc.size() == 0 )
|
||||
if( this.desc.isEmpty() )
|
||||
{
|
||||
try
|
||||
{
|
||||
|
||||
@@ -179,7 +179,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." );
|
||||
}
|
||||
|
||||
@@ -95,7 +95,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