commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sebb (JIRA)" <j...@apache.org>
Subject [jira] Created: (IO-235) Bugs in test cases?
Date Thu, 04 Mar 2010 17:53:27 GMT
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.


Mime
View raw message