prefer isEmpty over length() == 0

This commit is contained in:
thatsIch
2015-09-25 23:18:27 +02:00
parent 7a220e253d
commit 734d50d086
12 changed files with 15 additions and 15 deletions
+1 -1
View File
@@ -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;