Return-Path: Delivered-To: apmail-harmony-commits-archive@www.apache.org Received: (qmail 26697 invoked from network); 26 Feb 2007 10:17:44 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 26 Feb 2007 10:17:44 -0000 Received: (qmail 47265 invoked by uid 500); 26 Feb 2007 10:17:36 -0000 Delivered-To: apmail-harmony-commits-archive@harmony.apache.org Received: (qmail 47247 invoked by uid 500); 26 Feb 2007 10:17:36 -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 47232 invoked by uid 99); 26 Feb 2007 10:17:36 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 26 Feb 2007 02:17:36 -0800 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= 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; Mon, 26 Feb 2007 02:17:25 -0800 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id A76AA71403D for ; Mon, 26 Feb 2007 02:17:05 -0800 (PST) Message-ID: <9725903.1172485025683.JavaMail.jira@brutus> Date: Mon, 26 Feb 2007 02:17:05 -0800 (PST) From: "Ruth Cao (JIRA)" To: commits@harmony.apache.org Subject: [jira] Updated: (HARMONY-3238) [classlib][luni] InputStreamReader allocates fixed space internal buffer In-Reply-To: <26116959.1172484905838.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/HARMONY-3238?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Ruth Cao updated HARMONY-3238: ------------------------------ Attachment: Harmony-3238.diff May somebody pls try this? > [classlib][luni] InputStreamReader allocates fixed space internal buffer > ------------------------------------------------------------------------ > > Key: HARMONY-3238 > URL: https://issues.apache.org/jira/browse/HARMONY-3238 > Project: Harmony > Issue Type: Bug > Components: Classlib > Reporter: Ruth Cao > Attachments: Harmony-3238.diff > > > The following test case[1] fails on Harmony while passes on RI. It is due to java.io.InputStreamReader allocates fixed space. Error occurs when the dest buffer is larger than the internal one. > Besides, after the bug is fixed, tests.api.java.io.OutputStreamWriterTest can be taken out of the exclue list. I'll provide a patch soon. > [1] public void testHandleEarlyEOFChar_2() throws IOException { > int capacity = 65536; > byte[] bytes = new byte[capacity]; > byte[] bs = { 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H' }; > for (int i = 0; i < bytes.length; i++) { > bytes[i] = bs[i / 8192]; > } > String inputStr = new String(bytes); > int len = inputStr.length(); > File f = File.createTempFile("FileWriterBugTest ", null); //$NON-NLS-1$ > FileWriter writer = new FileWriter(f); > writer.write(inputStr); > writer.close(); > long flen = f.length(); > FileReader reader = new FileReader(f); > char[] outChars = new char[capacity]; > int outCount = reader.read(outChars); > String outStr = new String(outChars, 0, outCount); > f.deleteOnExit(); > assertEquals(len, flen); > assertEquals(inputStr, outStr); > } -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.