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] Resolved: (HARMONY-4294) [classlib][io] LineNumberReader treats \r\n as two lines
Date Tue, 03 Jul 2007 16:30:04 GMT

     [ https://issues.apache.org/jira/browse/HARMONY-4294?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Tony Wu resolved HARMONY-4294.
------------------------------

    Resolution: Fixed

Resolved at r552898 . Please check if it is fixed as you expected. Thanks.


> [classlib][io] LineNumberReader treats \r\n as two lines
> --------------------------------------------------------
>
>                 Key: HARMONY-4294
>                 URL: https://issues.apache.org/jira/browse/HARMONY-4294
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>            Reporter: Roman S. Bushmanov
>            Assignee: Tony Wu
>
> The API spec says 'A line is considered to be terminated by any one of a line feed ('\n'),
a carriage return ('\r'), or a carriage return followed immediately by a linefeed. '
> At the same time Harmony implementation of LineNumberReader treats the combination \r\n
as two line terminators.
> The test listed below prints on Harmony
> false
> true
> The expected output is single line
> false
> ------------------------- Test.java -------------------------------
> import java.io.*;
> public class Test {
>     public static void main(String[] args) throws Exception{
>         byte[] buffer = new byte[]{'\r','\n'};
>         LineNumberReader reader = new LineNumberReader(new InputStreamReader(new ByteArrayInputStream(buffer)));

>         while (reader.ready()){
>             System.out.println(null == reader.readLine());
>         }
>     }
> }
> ----------------------------------------------------------------------
> Affected functional test:
> functional/org/apache/harmony/test/func/api/java/lang/F_StringTest_04/F_StringTest_04.xml

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message