Code style changes.

This commit is contained in:
MobiusDev
2016-04-26 19:21:19 +00:00
parent 6a13705766
commit fc070c9238
768 changed files with 3338 additions and 4252 deletions

View File

@@ -135,7 +135,7 @@ public class GameServerThread extends Thread
}
catch (IOException e)
{
final String serverName = (getServerId() != -1 ? "[" + getServerId() + "] " + GameServerTable.getInstance().getServerNameById(getServerId()) : "(" + _connectionIPAddress + ")");
final String serverName = getServerId() != -1 ? "[" + getServerId() + "] " + GameServerTable.getInstance().getServerNameById(getServerId()) : "(" + _connectionIPAddress + ")";
final String msg = "GameServer " + serverName + ": Connection lost: " + e.getMessage();
_log.info(msg);
broadcastToTelnet(msg);

View File

@@ -175,13 +175,13 @@ public class LoginController
synchronized (_failedLoginAttemps)
{
failedLoginAttemps = _failedLoginAttemps.get(addr);
if (failedLoginAttemps == null)
if (failedLoginAttemps != null)
{
failedLoginAttemps = 1;
++failedLoginAttemps;
}
else
{
++failedLoginAttemps;
failedLoginAttemps = 1;
}
_failedLoginAttemps.put(addr, failedLoginAttemps);
@@ -370,7 +370,7 @@ public class LoginController
{
try
{
return this.removeBanForAddress(InetAddress.getByName(address));
return removeBanForAddress(InetAddress.getByName(address));
}
catch (UnknownHostException e)
{

View File

@@ -73,8 +73,8 @@ public class SessionKey
// when server doesn't show license it doesn't send the LoginOk packet, client doesn't have this part of the key then.
if (Config.SHOW_LICENCE)
{
return ((playOkID1 == key.playOkID1) && (loginOkID1 == key.loginOkID1) && (playOkID2 == key.playOkID2) && (loginOkID2 == key.loginOkID2));
return (playOkID1 == key.playOkID1) && (loginOkID1 == key.loginOkID1) && (playOkID2 == key.playOkID2) && (loginOkID2 == key.loginOkID2);
}
return ((playOkID1 == key.playOkID1) && (playOkID2 == key.playOkID2));
return (playOkID1 == key.playOkID1) && (playOkID2 == key.playOkID2);
}
}

View File

@@ -38,7 +38,7 @@ public abstract class L2LoginClientPacket extends ReceivablePacket<L2LoginClient
}
catch (Exception e)
{
_log.log(Level.SEVERE, "ERROR READING: " + this.getClass().getSimpleName() + ": " + e.getMessage(), e);
_log.log(Level.SEVERE, "ERROR READING: " + getClass().getSimpleName() + ": " + e.getMessage(), e);
return false;
}
}

View File

@@ -35,7 +35,7 @@ public final class GGAuth extends L2LoginServerPacket
_response = response;
if (Config.DEBUG)
{
_log.warning("Reason Hex: " + (Integer.toHexString(response)));
_log.warning("Reason Hex: " + Integer.toHexString(response));
}
}