Replaced zero equality checks with isEmpty() method.
This commit is contained in:
@@ -169,7 +169,7 @@ public class AvantGarde extends AbstractNpcAI
|
||||
}
|
||||
case "CancelCertification":
|
||||
{
|
||||
if (player.getSubClasses().size() == 0)
|
||||
if (player.getSubClasses().isEmpty())
|
||||
{
|
||||
htmltext = "32323-07.html";
|
||||
}
|
||||
|
@@ -167,7 +167,7 @@ public class AdminFightCalculator implements IAdminCommandHandler
|
||||
|
||||
L2Character npc1 = null;
|
||||
L2Character npc2 = null;
|
||||
if (params.length() == 0)
|
||||
if (params.isEmpty())
|
||||
{
|
||||
npc1 = activeChar;
|
||||
npc2 = (L2Character) activeChar.getTarget();
|
||||
@@ -303,7 +303,7 @@ public class AdminFightCalculator implements IAdminCommandHandler
|
||||
final StringBuilder replyMSG = new StringBuilder(1000);
|
||||
replyMSG.append("<html><title>Selected mobs to fight</title><body><table>");
|
||||
|
||||
if (params.length() == 0)
|
||||
if (params.isEmpty())
|
||||
{
|
||||
replyMSG.append("<tr><td width=140>Parameter</td><td width=70>me</td><td width=70>target</td></tr>");
|
||||
}
|
||||
@@ -334,7 +334,7 @@ public class AdminFightCalculator implements IAdminCommandHandler
|
||||
|
||||
replyMSG.append("</tr></table><center><br>");
|
||||
|
||||
if (params.length() == 0)
|
||||
if (params.isEmpty())
|
||||
{
|
||||
replyMSG.append("<button value=\"Retry\" action=\"bypass -h admin_fight_calculator_show\" width=100 height=15 back=\"L2UI_ct1.button_df\" fore=\"L2UI_ct1.button_df\">");
|
||||
}
|
||||
|
@@ -58,7 +58,7 @@ public class QuestLink implements IBypassHandler
|
||||
catch (IndexOutOfBoundsException ioobe)
|
||||
{
|
||||
}
|
||||
if (quest.length() == 0)
|
||||
if (quest.isEmpty())
|
||||
{
|
||||
showQuestWindow(activeChar, (L2Npc) target);
|
||||
}
|
||||
|
@@ -356,7 +356,7 @@ public final class PetitionManager
|
||||
|
||||
final SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm");
|
||||
|
||||
if (_pendingPetitions.size() == 0)
|
||||
if (_pendingPetitions.isEmpty())
|
||||
{
|
||||
htmlContent.append("<tr><td>There are no currently pending petitions.</td></tr>");
|
||||
}
|
||||
|
@@ -64,7 +64,7 @@ public class SQLAccountManager
|
||||
|
||||
if (_mode.equals("1") || _mode.equals("2") || _mode.equals("3"))
|
||||
{
|
||||
while (_uname.trim().length() == 0)
|
||||
while (_uname.trim().isEmpty())
|
||||
{
|
||||
System.out.print("Username: ");
|
||||
_uname = _scn.next().toLowerCase();
|
||||
@@ -72,7 +72,7 @@ public class SQLAccountManager
|
||||
|
||||
if (_mode.equals("1"))
|
||||
{
|
||||
while (_pass.trim().length() == 0)
|
||||
while (_pass.trim().isEmpty())
|
||||
{
|
||||
System.out.print("Password: ");
|
||||
_pass = _scn.next();
|
||||
@@ -81,7 +81,7 @@ public class SQLAccountManager
|
||||
|
||||
if (_mode.equals("1") || _mode.equals("2"))
|
||||
{
|
||||
while (_level.trim().length() == 0)
|
||||
while (_level.trim().isEmpty())
|
||||
{
|
||||
System.out.print("Access level: ");
|
||||
_level = _scn.next();
|
||||
|
@@ -40,7 +40,7 @@ public class GameServerRegister extends BaseGameServerRegister
|
||||
super();
|
||||
load();
|
||||
|
||||
if (GameServerTable.getInstance().getServerNames().size() == 0)
|
||||
if (GameServerTable.getInstance().getServerNames().isEmpty())
|
||||
{
|
||||
System.out.println("No available names for GameServer, verify servername.xml file exists in the LoginServer folder.");
|
||||
System.exit(1);
|
||||
|
Reference in New Issue
Block a user