Minor refactoring

I think having the read method in the same place as the write method might help preventing some errors
There are some people who are strictly against using static methods. I suppose I'm not experienced enough yet.
This commit is contained in:
2015-04-18 16:17:37 +02:00
parent 2cd857dd36
commit 51c1ecfd41
15 changed files with 116 additions and 58 deletions

View File

@ -27,6 +27,7 @@ import org.slf4j.LoggerFactory;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Scanner;
/**
* Created by chris on 06.04.15.
@ -47,9 +48,9 @@ public class Main {
}
});
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
System.out.print("Press Enter to exit\n");
br.readLine();
Scanner scanner = new Scanner(System.in);
scanner.nextLine();
LOG.info("Shutting down client");
networkNode.stop();
}