Replaced zero equality checks with isEmpty() method.
This commit is contained in:
@@ -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();
|
||||
|
@@ -39,7 +39,7 @@ public class GameServerRegister extends BaseGameServerRegister
|
||||
{
|
||||
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