Skip to content

Commit 70193d3

Browse files
Bugfix
Because using the console in Java is unnecessarily complicated.
1 parent 20f2fdd commit 70193d3

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/main/java/de/rub/nds/modifiablevariable/biginteger/BigIntegerModificationFactory.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
import java.util.LinkedList;
2121
import java.util.List;
2222
import java.util.Random;
23+
import java.util.Scanner;
2324

2425
/**
2526
* @author
@@ -96,9 +97,8 @@ public BigInteger modify(BigInteger oldVal) {
9697

9798
System.out.println("Enter new value for " + variableName + " (Old value is " + oldVal.toString()
9899
+ "): ");
99-
String input = System.console().readLine().trim();
100-
101-
result = new BigInteger(input);
100+
101+
result = new Scanner(System.in).nextBigInteger();
102102

103103
return result;
104104
}

0 commit comments

Comments
 (0)