From 9f5ea820f3dfd279fb2bb499ca76252da5e4e96b Mon Sep 17 00:00:00 2001 From: EpicKnarvik97 Date: Tue, 7 Apr 2020 20:10:36 +0200 Subject: [PATCH] =?UTF-8?q?Gj=C3=B8r=20ting=20final=20som=20kan=20v=C3=A6r?= =?UTF-8?q?e=20final?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../inf112/fiasko/roborally/networking/RoboRallyClient.java | 4 ++-- .../inf112/fiasko/roborally/networking/RoboRallyServer.java | 6 +++--- .../roborally/networking/containers/ErrorResponse.java | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/main/java/inf112/fiasko/roborally/networking/RoboRallyClient.java b/src/main/java/inf112/fiasko/roborally/networking/RoboRallyClient.java index 24c4059..a5eb22c 100644 --- a/src/main/java/inf112/fiasko/roborally/networking/RoboRallyClient.java +++ b/src/main/java/inf112/fiasko/roborally/networking/RoboRallyClient.java @@ -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(); diff --git a/src/main/java/inf112/fiasko/roborally/networking/RoboRallyServer.java b/src/main/java/inf112/fiasko/roborally/networking/RoboRallyServer.java index 020b64f..8c94ba2 100644 --- a/src/main/java/inf112/fiasko/roborally/networking/RoboRallyServer.java +++ b/src/main/java/inf112/fiasko/roborally/networking/RoboRallyServer.java @@ -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 clients; - private Map playerNames; + private final Map clients; + private final Map playerNames; /** * Instantiates a new Robo Rally server listener diff --git a/src/main/java/inf112/fiasko/roborally/networking/containers/ErrorResponse.java b/src/main/java/inf112/fiasko/roborally/networking/containers/ErrorResponse.java index 3bf7358..3220ba9 100644 --- a/src/main/java/inf112/fiasko/roborally/networking/containers/ErrorResponse.java +++ b/src/main/java/inf112/fiasko/roborally/networking/containers/ErrorResponse.java @@ -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; /**