Skip to content
Snippets Groups Projects
Commit 767484fe authored by Rafi Zereselasie (raz070)'s avatar Rafi Zereselasie (raz070)
Browse files

Removed commented code and cleaned up warnings.

parent a545ce6a
No related branches found
No related tags found
No related merge requests found
......@@ -7,12 +7,10 @@ import java.util.Arrays;
public class ReceiveThread extends Thread {
private BufferedReader reader;
private Socket socket;
private ScheduleClient client;
private final ScheduleClient client;
public ReceiveThread(Socket socket, ScheduleClient client) {
this.client = client;
this.socket = socket;
try {
InputStream input = socket.getInputStream();
......@@ -29,14 +27,9 @@ public class ReceiveThread extends Thread {
//System.out.println("ReceiveThread.Run.Hello"); why does this run twice.
String response = reader.readLine();
String[] args = response.split("/");
//System.out.println(args[0]); testing
switch (args[0]) {
case "allEmployees":
this.client.employees = new ArrayList<String>(Arrays.asList(args));
break;
case "Shifts":
this.client.shifts = new ArrayList<String>(Arrays.asList(args));
break;
case "allEmployees" -> this.client.employees = new ArrayList<>(Arrays.asList(args));
case "Shifts" -> this.client.shifts = new ArrayList<>(Arrays.asList(args));
}
} catch (IOException error) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment