You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Tony Wu (JIRA)" <ji...@apache.org> on 2006/11/06 10:36:37 UTC

[jira] Created: (HARMONY-2076) [classlib][luni]a bug of j.u.Scanner

[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


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

        

[jira] Commented: (HARMONY-2076) [classlib][luni]a bug of j.u.Scanner

Posted by "Tony Wu (JIRA)" <ji...@apache.org>.
    [ 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

        

[jira] Updated: (HARMONY-2076) [classlib][luni]a bug of j.u.Scanner

Posted by "Tony Wu (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/HARMONY-2076?page=all ]

Tony Wu updated HARMONY-2076:
-----------------------------

    Attachment: luni.diff

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

        

[jira] Updated: (HARMONY-2076) [classlib][luni]a bug of j.u.Scanner

Posted by "Tony Wu (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/HARMONY-2076?page=all ]

Tony Wu updated HARMONY-2076:
-----------------------------

    Attachment: nio.diff

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

        

[jira] Commented: (HARMONY-2076) [classlib][luni]a bug of j.u.Scanner

Posted by "Tony Wu (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/HARMONY-2076?page=comments#action_12448077 ] 
            
Tony Wu commented on HARMONY-2076:
----------------------------------

verfied at 472394, looks good.
Thanks Tim.

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

        

[jira] Resolved: (HARMONY-2076) [classlib][luni]a bug of j.u.Scanner

Posted by "Tim Ellison (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/HARMONY-2076?page=all ]

Tim Ellison resolved HARMONY-2076.
----------------------------------

    Resolution: Fixed

Thanks Tony.

Patch applied to LUNI and NIO modules at repo revision r472130.

Please check that the patch was applied as you expected.


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

        

[jira] Assigned: (HARMONY-2076) [classlib][luni]a bug of j.u.Scanner

Posted by "Tim Ellison (JIRA)" <ji...@apache.org>.
     [ 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

        

[jira] Closed: (HARMONY-2076) [classlib][luni]a bug of j.u.Scanner

Posted by "Tim Ellison (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/HARMONY-2076?page=all ]

Tim Ellison closed HARMONY-2076.
--------------------------------


Verified by Tony.


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