Gjør ting final som kan være final

This commit is contained in:
Kristian Knarvik 2020-04-07 20:10:36 +02:00
parent 1abaea3e3b
commit 9f5ea820f3
3 changed files with 6 additions and 6 deletions

View File

@ -15,7 +15,7 @@ import java.io.IOException;
* This class represents a client capable of connecting to a Robo Rally server
*/
public class RoboRallyClient {
private Client client;
private final Client client;
/**
* Instantiates a new Robo Rally client
@ -45,7 +45,7 @@ public class RoboRallyClient {
* This listener handles all receiving from the server
*/
class RoboRallyClientListener extends Listener {
private RoboRallyWrapper wrapper;
private final RoboRallyWrapper wrapper;
RoboRallyClientListener(RoboRallyWrapper wrapper) {
super();

View File

@ -15,7 +15,7 @@ import java.util.Map;
* This class represents a Robo Rally Server
*/
public class RoboRallyServer {
private Server server;
private final Server server;
private RoboRallyServerListener listener;
public RoboRallyServer() throws IOException {
@ -56,8 +56,8 @@ public class RoboRallyServer {
*/
class RoboRallyServerListener extends Listener {
private Connection host;
private Map<Connection, RobotID> clients;
private Map<Connection, String> playerNames;
private final Map<Connection, RobotID> clients;
private final Map<Connection, String> playerNames;
/**
* Instantiates a new Robo Rally server listener

View File

@ -4,7 +4,7 @@ package inf112.fiasko.roborally.networking.containers;
* This class represents a response saying that something went wrong with the request
*/
public class ErrorResponse {
private String errorMessage;
private final String errorMessage;
private Exception thrownException;
/**