You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Sebb (JIRA)" <ji...@apache.org> on 2010/03/04 18:53:27 UTC

[jira] Created: (IO-235) Bugs in test cases?

Bugs in test cases?
-------------------

                 Key: IO-235
                 URL: https://issues.apache.org/jira/browse/IO-235
             Project: Commons IO
          Issue Type: Bug
            Reporter: Sebb


testCopy_byteArrayToWriter() has the following code:

{code}
ByteArrayOutputStream baout = new ByteArrayOutputStream();
OutputStream out = new YellOnFlushAndCloseOutputStream(baout, false, true); // out is not used
Writer writer = new java.io.OutputStreamWriter(baout, "US-ASCII"); // uses baout - should it use out instead
{code}

It looks like the Writer should be created from out rather than baout - otherwise why create out?

Similarly for

testCopy_inputStreamToWriter()
testCopy_readerToWriter()
testCopy_stringToWriter()

The tests still pass if the Writer is changed to use out.

Thoughts?

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


[jira] Resolved: (IO-235) Bugs in CopyUtilsTest test cases?

Posted by "Niall Pemberton (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/IO-235?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Niall Pemberton resolved IO-235.
--------------------------------

         Assignee: Niall Pemberton
    Fix Version/s: 2.0
       Resolution: Fixed

Fixed: http://svn.apache.org/viewvc?view=revision&revision=982430

> Bugs in CopyUtilsTest test cases?
> ---------------------------------
>
>                 Key: IO-235
>                 URL: https://issues.apache.org/jira/browse/IO-235
>             Project: Commons IO
>          Issue Type: Bug
>            Reporter: Sebb
>            Assignee: Niall Pemberton
>             Fix For: 2.0
>
>
> testCopy_byteArrayToWriter() has the following code:
> {code}
> ByteArrayOutputStream baout = new ByteArrayOutputStream();
> OutputStream out = new YellOnFlushAndCloseOutputStream(baout, false, true); // out is not used
> Writer writer = new java.io.OutputStreamWriter(baout, "US-ASCII"); // uses baout - should it use out instead
> {code}
> It looks like the Writer should be created from out rather than baout - otherwise why create out?
> Similarly for
> testCopy_inputStreamToWriter()
> testCopy_readerToWriter()
> testCopy_stringToWriter()
> The tests still pass if the Writer is changed to use out.
> Thoughts?

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


[jira] Updated: (IO-235) Bugs in CopyUtilsTest test cases?

Posted by "Niall Pemberton (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/IO-235?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Niall Pemberton updated IO-235:
-------------------------------

    Summary: Bugs in CopyUtilsTest test cases?  (was: Bugs in test cases?)

> Bugs in CopyUtilsTest test cases?
> ---------------------------------
>
>                 Key: IO-235
>                 URL: https://issues.apache.org/jira/browse/IO-235
>             Project: Commons IO
>          Issue Type: Bug
>            Reporter: Sebb
>
> testCopy_byteArrayToWriter() has the following code:
> {code}
> ByteArrayOutputStream baout = new ByteArrayOutputStream();
> OutputStream out = new YellOnFlushAndCloseOutputStream(baout, false, true); // out is not used
> Writer writer = new java.io.OutputStreamWriter(baout, "US-ASCII"); // uses baout - should it use out instead
> {code}
> It looks like the Writer should be created from out rather than baout - otherwise why create out?
> Similarly for
> testCopy_inputStreamToWriter()
> testCopy_readerToWriter()
> testCopy_stringToWriter()
> The tests still pass if the Writer is changed to use out.
> Thoughts?

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