Dolda2000 GitWeb
/
kaka
/
cakelight.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
8268724
)
Bugfix - reader was closed after reading
author
Tomas Wenström
<tomas@cakepi>
Thu, 28 Nov 2019 21:17:09 +0000
(22:17 +0100)
committer
Tomas Wenström
<tomas@cakepi>
Thu, 28 Nov 2019 21:17:09 +0000
(22:17 +0100)
src/kaka/cakelight/Console.java
patch
|
blob
|
blame
|
history
diff --git
a/src/kaka/cakelight/Console.java
b/src/kaka/cakelight/Console.java
index
3d27a06
..
873dac1
100644
(file)
--- a/
src/kaka/cakelight/Console.java
+++ b/
src/kaka/cakelight/Console.java
@@
-70,16
+70,15
@@
public class Console extends Thread {
@Override
public void run() {
@Override
public void run() {
-
while (true
) {
- System.out.print("> ");
- try (BufferedReader reader = new BufferedReader(new InputStreamReader(System.in))) {
+
try (BufferedReader reader = new BufferedReader(new InputStreamReader(System.in))
) {
+ while (true) {
+ System.out.print("> ");
String input = reader.readLine();
handleInput(input);
String input = reader.readLine();
handleInput(input);
- } catch (IOException e) {
- System.out.println("Error reading from command line");
- break;
}
}
- }
+ } catch (IOException e) {
+ System.out.println("Error reading from command line");
+ }
}
void handleInput(String input) {
}
void handleInput(String input) {