You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Tim Ellison (JIRA)" <ji...@apache.org> on 2006/11/06 13:12:38 UTC
[jira] Assigned: (HARMONY-2076) [classlib][luni]a bug of
j.u.Scanner
[ http://issues.apache.org/jira/browse/HARMONY-2076?page=all ]
Tim Ellison reassigned HARMONY-2076:
------------------------------------
Assignee: Tim Ellison
> [classlib][luni]a bug of j.u.Scanner
> ------------------------------------
>
> Key: HARMONY-2076
> URL: http://issues.apache.org/jira/browse/HARMONY-2076
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Reporter: Tony Wu
> Assigned To: Tim Ellison
> Attachments: luni.diff, nio.diff
>
>
> the testcase below failed on harmony but passed on RI
> public void testScanner() throws Exception {
> final ServerSocket ss = new ServerSocket(45555);
> Thread t = new Thread() {
> public void run() {
> try {
> Socket s = ss.accept();
> OutputStream os = s.getOutputStream();
> Writer w = new OutputStreamWriter(os);
> w.write("123\n");
> w.write("456\n");
> w.write("789\n");
> s.close();
> ss.close();
> } catch (Exception e) {
> e.printStackTrace();
> }
> }
> };
> t.start();
> SocketChannel sc = SocketChannel.open();
> InetSocketAddress isa = new InetSocketAddress("localhost", 45555);
> sc.connect(isa);
> sc.configureBlocking(false);
> Scanner s = new Scanner(sc);
> while (s.hasNextInt()) {
> System.out.println(s.nextInt());
> }
> assertFalse(sc.isBlocking());
> }
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira