Added missing final modifiers.

This commit is contained in:
MobiusDev
2015-12-26 12:03:36 +00:00
parent cc92e5d062
commit e0d681a17e
974 changed files with 5919 additions and 5917 deletions

View File

@@ -83,10 +83,10 @@ public final class GameStatusThread extends Thread
private boolean isValidIP(Socket client)
{
boolean result = false;
InetAddress ClientIP = client.getInetAddress();
final InetAddress ClientIP = client.getInetAddress();
// convert IP to String, and compare with list
String clientStringIP = ClientIP.getHostAddress();
final String clientStringIP = ClientIP.getHostAddress();
telnetOutput(1, "Connection from: " + clientStringIP);
@@ -99,10 +99,10 @@ public final class GameStatusThread extends Thread
final File file = new File(Config.TELNET_FILE);
try (InputStream telnetIS = new FileInputStream(file))
{
Properties telnetSettings = new Properties();
final Properties telnetSettings = new Properties();
telnetSettings.load(telnetIS);
String HostList = telnetSettings.getProperty("ListOfHosts", "127.0.0.1,localhost,::1");
final String HostList = telnetSettings.getProperty("ListOfHosts", "127.0.0.1,localhost,::1");
if (Config.DEVELOPER)
{
@@ -159,7 +159,7 @@ public final class GameStatusThread extends Thread
_print.println("Please Insert Your Password!");
_print.print("Password: ");
_print.flush();
String tmpLine = _read.readLine();
final String tmpLine = _read.readLine();
if (tmpLine == null)
{
_print.println("Error.");

View File

@@ -75,10 +75,10 @@ public final class LoginStatusThread extends Thread
private boolean isValidIP(Socket client)
{
boolean result = false;
InetAddress ClientIP = client.getInetAddress();
final InetAddress ClientIP = client.getInetAddress();
// convert IP to String, and compare with list
String clientStringIP = ClientIP.getHostAddress();
final String clientStringIP = ClientIP.getHostAddress();
telnetOutput(1, "Connection from: " + clientStringIP);
@@ -91,10 +91,10 @@ public final class LoginStatusThread extends Thread
final File file = new File(Config.TELNET_FILE);
try (InputStream telnetIS = new FileInputStream(file))
{
Properties telnetSettings = new Properties();
final Properties telnetSettings = new Properties();
telnetSettings.load(telnetIS);
String HostList = telnetSettings.getProperty("ListOfHosts", "127.0.0.1,localhost,::1");
final String HostList = telnetSettings.getProperty("ListOfHosts", "127.0.0.1,localhost,::1");
if (Config.DEVELOPER)
{
@@ -149,7 +149,7 @@ public final class LoginStatusThread extends Thread
_print.println("Please Insert Your Password!");
_print.print("Password: ");
_print.flush();
String tmpLine = _read.readLine();
final String tmpLine = _read.readLine();
if (tmpLine == null)
{
_print.println("Error.");

View File

@@ -53,14 +53,14 @@ public class Status extends Thread
{
try
{
Socket connection = statusServerSocket.accept();
final Socket connection = statusServerSocket.accept();
if (_mode == Server.MODE_GAMESERVER)
{
new GameStatusThread(connection, _uptime, _statusPw);
}
else if (_mode == Server.MODE_LOGINSERVER)
{
LoginStatusThread lst = new LoginStatusThread(connection, _uptime, _statusPw);
final LoginStatusThread lst = new LoginStatusThread(connection, _uptime, _statusPw);
if (lst.isAlive())
{
_loginStatus.add(lst);
@@ -101,12 +101,12 @@ public class Status extends Thread
{
super("Status");
_mode = mode;
Properties telnetSettings = new Properties();
final Properties telnetSettings = new Properties();
try (InputStream is = new FileInputStream(new File(Config.TELNET_FILE)))
{
telnetSettings.load(is);
}
int statusPort = Integer.parseInt(telnetSettings.getProperty("StatusPort", "12345"));
final int statusPort = Integer.parseInt(telnetSettings.getProperty("StatusPort", "12345"));
_statusPw = telnetSettings.getProperty("StatusPW");
if ((_mode == Server.MODE_GAMESERVER) || (_mode == Server.MODE_LOGINSERVER))
@@ -134,7 +134,7 @@ public class Status extends Thread
for (int i = 0; i < length; i++)
{
int charSet = Rnd.nextInt(3);
final int charSet = Rnd.nextInt(3);
switch (charSet)
{
case 0:
@@ -153,7 +153,7 @@ public class Status extends Thread
public void sendMessageToTelnets(String msg)
{
List<LoginStatusThread> lsToRemove = new ArrayList<>(); // TODO(Zoey76): Unused?
final List<LoginStatusThread> lsToRemove = new ArrayList<>(); // TODO(Zoey76): Unused?
for (LoginStatusThread ls : _loginStatus)
{
if (ls.isInterrupted())