diff options
author | Elliott Hughes <enh@google.com> | 2011-05-25 11:22:39 -0700 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2011-05-25 11:22:39 -0700 |
commit | 159dd6646fc204b3accbb598f190b3f8e0fbfce0 (patch) | |
tree | daae566cea7e164843d0e5ab9c0016fc784bc02b /luni | |
parent | 7a4511926c670efc527d352880c442ee3ce060e5 (diff) | |
parent | dd3297417120e11cfafd502f008b4719f6974bd8 (diff) | |
download | libcore-159dd6646fc204b3accbb598f190b3f8e0fbfce0.zip libcore-159dd6646fc204b3accbb598f190b3f8e0fbfce0.tar.gz libcore-159dd6646fc204b3accbb598f190b3f8e0fbfce0.tar.bz2 |
Merge "Make it possible to test java.io.Console." into dalvik-dev
Diffstat (limited to 'luni')
-rw-r--r-- | luni/src/main/java/java/io/Console.java | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/luni/src/main/java/java/io/Console.java b/luni/src/main/java/java/io/Console.java index 1fd666b..a1d2097 100644 --- a/luni/src/main/java/java/io/Console.java +++ b/luni/src/main/java/java/io/Console.java @@ -47,15 +47,15 @@ public final class Console implements Flushable { return null; } try { - return new Console(); + return new Console(System.in, System.out); } catch (IOException ex) { throw new AssertionError(ex); } } - private Console() throws IOException { - this.reader = new ConsoleReader(System.in); - this.writer = new ConsoleWriter(System.out); + private Console(InputStream in, OutputStream out) throws IOException { + this.reader = new ConsoleReader(in); + this.writer = new ConsoleWriter(out); } public void flush() { |