Cleanup
This commit is contained in:
parent
24c4e622e1
commit
5565fd2201
2 changed files with 32 additions and 30 deletions
|
@ -11,14 +11,12 @@ import java.io.OutputStream;
|
|||
import java.net.InetSocketAddress;
|
||||
import java.util.Collections;
|
||||
import java.util.HashMap;
|
||||
import java.util.Timer;
|
||||
import java.util.TimerTask;
|
||||
import java.util.concurrent.Executors;
|
||||
import java.util.concurrent.ScheduledExecutorService;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
public class Main {
|
||||
private static final HashMap<String, Integer> data = new HashMap<String, Integer>();
|
||||
private static final HashMap<String, Integer> data = new HashMap<>();
|
||||
static OebbCheck check = new OebbCheck();
|
||||
|
||||
public static void main(String[] args) throws IOException {
|
||||
|
@ -28,14 +26,11 @@ public class Main {
|
|||
server.setExecutor(null); // creates a default executor
|
||||
server.start();
|
||||
|
||||
Runnable task = new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
try {
|
||||
refresh();
|
||||
} catch (IOException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
Runnable task = () -> {
|
||||
try {
|
||||
refresh();
|
||||
} catch (IOException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
};
|
||||
try (ScheduledExecutorService service = Executors.newSingleThreadScheduledExecutor()) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue