瀏覽代碼

refactor, trimming one line on runnable calls

Patrick Glavin 6 年之前
父節點
當前提交
17ac41e25f
共有 1 個檔案被更改,包括 2 行新增4 行删除
  1. 2
    4
      Client/src/main/java/SimpleShell.java

+ 2
- 4
Client/src/main/java/SimpleShell.java 查看文件

@@ -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
                 }