harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mikhail Markov (JIRA)" <j...@apache.org>
Subject [jira] Updated: (HARMONY-4177) [classlib][io] Unnecessary data copying in BufferedOutputStream.write() method
Date Fri, 15 Jun 2007 14:35:26 GMT

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

Mikhail Markov updated HARMONY-4177:
------------------------------------

    Attachment: H-4177.patch

Here is the patch fixing the issue plus the regression test.

Fix description: Added internal buffer flushing in 2 cases:
1) when the stream's buffer length is less that 'length' parameter
2) ( fixes what was described in this JIRA description) when the space left in the stream's
buffer is less that 'length' parameter.
The regression tests for both cases were added.

> [classlib][io] Unnecessary data copying in BufferedOutputStream.write() method 
> -------------------------------------------------------------------------------
>
>                 Key: HARMONY-4177
>                 URL: https://issues.apache.org/jira/browse/HARMONY-4177
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>            Reporter: Roman S. Bushmanov
>         Attachments: H-4177.patch, Test.java
>
>
> According to specification, if the data to write is longer than the free buffer space
than the buffer should be flushed first to avoid unnecessary data copying.
> Harmony behaves differently. The buffer contents is written to underlying output stream
only when it is full.
> To reproduce the issue, please run the attached testcase.
> The expected output is  "ab" while harmony prints "abc".
> Affected test: 
> functional/org/apache/harmony/test/func/api/java/io/BufferedOutputStream/BufferedOutputStreamTest.xml
> (see HARMONY-3528) 

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