commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Brett Johnson (JIRA)" <>
Subject [jira] Created: (IO-227) throws IOException after autoclose
Date Thu, 28 Jan 2010 19:51:35 GMT throws IOException after autoclose

                 Key: IO-227
             Project: Commons IO
          Issue Type: Bug
          Components: Streams/Writers
    Affects Versions: 1.4
         Environment: Apple Inc. Java HotSpot(TM) 64-Bit Server VM 1.6.0_17; Mac OS X 10.5.8
            Reporter: Brett Johnson

A custom reported a problem, wherein our product was catching and logging many IOExceptions.
 Upon examining the logs I see: Attempted read on closed stream.
	at org.apache.commons.httpclient.AutoCloseInputStream.isReadAllowed(
	at com.acme.DocPusher$
	at com.acme.CompressedFilterInputStream.fillbuff(
	at com.acme.Base64FilterInputStream.fillbuff(
	at com.acme.DocPusher$

As you can see, this is a pipeline consisting of multiple FilterInputStream segments that
process data flowing through the pipeline.  The source of the data is in InputStream provided
by a third party plug-in component.  In our customer's situation, that InputStream is a AutoCloseInputStream
returned by a Sharepoint API call.

When I saw the "Attempted read on closed stream.", I was incredulous; "Reading from a closed
stream - that's a rookie mistake."  However, when examining the JavaDoc for AutoCloseInputStream,
I read:  [emphasis mine]
"Proxy stream that closes and discards the underlying stream *as soon as the end of input
has been reached* or when the stream is explicitly closed."

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

View raw message