commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sebb (JIRA)" <j...@apache.org>
Subject [jira] Commented: (IO-214) Inconsistent synchronization of fields
Date Wed, 19 Aug 2009 22:27:14 GMT

    [ 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.


Mime
View raw message