Return-Path: Delivered-To: apmail-harmony-commits-archive@www.apache.org Received: (qmail 84209 invoked from network); 28 Jun 2007 07:54:48 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 28 Jun 2007 07:54:48 -0000 Received: (qmail 50382 invoked by uid 500); 28 Jun 2007 07:54:51 -0000 Delivered-To: apmail-harmony-commits-archive@harmony.apache.org Received: (qmail 50298 invoked by uid 500); 28 Jun 2007 07:54:51 -0000 Mailing-List: contact commits-help@harmony.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@harmony.apache.org Delivered-To: mailing list commits@harmony.apache.org Received: (qmail 50289 invoked by uid 99); 28 Jun 2007 07:54:51 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 28 Jun 2007 00:54:51 -0700 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO brutus.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 28 Jun 2007 00:54:47 -0700 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 5BCBF714062 for ; Thu, 28 Jun 2007 00:54:26 -0700 (PDT) Message-ID: <28573940.1183017266371.JavaMail.jira@brutus> Date: Thu, 28 Jun 2007 00:54:26 -0700 (PDT) From: "Roman S. Bushmanov (JIRA)" To: commits@harmony.apache.org Subject: [jira] Created: (HARMONY-4294) [classlib][io] LineNumberReader treats \r\n as two lines MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [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.