Browse Source

refactor, trimming one line on runnable calls

Patrick Glavin 6 years ago
parent
commit
17ac41e25f
1 changed files with 2 additions and 4 deletions
  1. 2
    4
      Client/src/main/java/SimpleShell.java

+ 2
- 4
Client/src/main/java/SimpleShell.java View File

@@ -106,8 +106,7 @@ public class SimpleShell {
106 106
 
107 107
                 // ids
108 108
                 if (list.contains("ids")) {
109
-                    IDGetter idGetter = new IDGetter(user, webber);
110
-                    Thread thread = new Thread(idGetter);
109
+                    Thread thread = new Thread(new IDGetter(user, webber));
111 110
                     thread.start();
112 111
                     continue;
113 112
                 }
@@ -127,8 +126,7 @@ public class SimpleShell {
127 126
                 }
128 127
 
129 128
                 if (list.contains("send")) {
130
-                    MessageSender sender = new MessageSender(list, user, webber);
131
-                    Thread thread = new Thread(sender);
129
+                    Thread thread = new Thread(new MessageSender(list, user, webber));
132 130
                     thread.start();
133 131
                     continue;
134 132
                 }