You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Roman S. Bushmanov (JIRA)" <ji...@apache.org> on 2007/06/28 09:54:26 UTC
[jira] Created: (HARMONY-4294) [classlib][io] LineNumberReader
treats \r\n as two lines
[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
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.
[jira] Resolved: (HARMONY-4294) [classlib][io] LineNumberReader
treats \r\n as two lines
Posted by "Tony Wu (JIRA)" <ji...@apache.org>.
[ 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.
[jira] Assigned: (HARMONY-4294) [classlib][io] LineNumberReader
treats \r\n as two lines
Posted by "Tony Wu (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-4294?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Tony Wu reassigned HARMONY-4294:
--------------------------------
Assignee: Tony Wu
> [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.