harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tony Wu (JIRA)" <j...@apache.org>
Subject [jira] Commented: (HARMONY-2076) [classlib][luni]a bug of j.u.Scanner
Date Mon, 06 Nov 2006 09:38:40 GMT
    [ http://issues.apache.org/jira/browse/HARMONY-2076?page=comments#action_12447401 ] 
            
Tony Wu commented on HARMONY-2076:
----------------------------------

patch available, would you please have a try, thanks.

> [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
>         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

        

Mime
View raw message