commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Niall Pemberton (JIRA)" <j...@apache.org>
Subject [jira] Issue Comment Edited: (IO-174) CharSequenceReader does not obey Reader contract and throw IOExceptions if read when closed
Date Sun, 13 Mar 2011 23:24:59 GMT

    [ https://issues.apache.org/jira/browse/IO-174?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13006289#comment-13006289
] 

Niall Pemberton edited comment on IO-174 at 3/13/11 11:23 PM:
--------------------------------------------------------------

Yes you're right and its a shame I didn't think of it at the time.

However, any break in binary compatibility will force a package rename for IO here in commons.
So until that happens, this change can't.

      was (Author: niallp):
    Yes you're right and its a shame I didn't think of it at the time.

However, any break in binary compatibility will force a package for IO here in commons. So
until that happens, this change can't.
  
> CharSequenceReader does not obey Reader contract and throw IOExceptions if read when
closed
> -------------------------------------------------------------------------------------------
>
>                 Key: IO-174
>                 URL: https://issues.apache.org/jira/browse/IO-174
>             Project: Commons IO
>          Issue Type: Bug
>          Components: Streams/Writers
>    Affects Versions: 1.4
>            Reporter: Douglas Hauge
>         Attachments: IO-174.patch
>
>
> In the Java specs for [*java.io.Reader.close()*|http://java.sun.com/j2se/1.5.0/docs/api/java/io/Reader.html#close()],
it states
> {panel}
> Once a stream has been closed, further read(), ready(), mark(), or reset() invocations
will throw an IOException
> {panel}
> However, the *org.apache.commons.io.input.CharSequenceReader* does not do this, but instead
resets the file back to the start when it is closed. This causes problems when passing this
reader to some libraries (albeit admittedly poorly written ones) that rely on *read* throwing
an *IOException* after the reader has been closed.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message