[
https://issues.apache.org/jira/browse/IO-214?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12745232#action_12745232
]
Sebb commented on IO-214:
-------------------------
Re: ByteArrayOutputStream - good point, I'd not noticed that.
Not sure why Findbugs does not detect the inconsistent synch. in InputStream,
but it looks like both skip() and afterRead() need to be synchronised.
> Inconsistent synchronization of fields
> --------------------------------------
>
> Key: IO-214
> URL: https://issues.apache.org/jira/browse/IO-214
> Project: Commons IO
> Issue Type: Bug
> Components: Streams/Writers
> Reporter: Sebb
> Attachments: IO-214-Counting-Stream-Sync.patch
>
>
> The field ByteArrayOutputStream.count is always accessed in a synchronised
> block, apart from when the user calls toBufferedInputStream().
> This seems wrong.
> Similarly for the count field in CountingOutputStream.beforeWrite(int n)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.