[jira] Created: (VFS-335) MonitorInputStream.read() methods should be synchronised

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

[jira] Created: (VFS-335) MonitorInputStream.read() methods should be synchronised

Gilles (Jira)
 MonitorInputStream.read() methods should be synchronised
---------------------------------------------------------

                 Key: VFS-335
                 URL: https://issues.apache.org/jira/browse/VFS-335
             Project: Commons VFS
          Issue Type: Bug
    Affects Versions: 1.0
            Reporter: Sebb


The  MonitorInputStream.read() methods should probably be synchronised, because they override methods which are synch.

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

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (VFS-335) MonitorInputStream.read() methods should be synchronised

Gilles (Jira)

    [ https://issues.apache.org/jira/browse/VFS-335?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12966851#action_12966851 ]

Ralph Goers commented on VFS-335:
---------------------------------

That doesn't seem to be a very good reason to require the methods be synchronized.  However, I do notice some inconsistencies and there is a counter that isn't thread safe.

>  MonitorInputStream.read() methods should be synchronised
> ---------------------------------------------------------
>
>                 Key: VFS-335
>                 URL: https://issues.apache.org/jira/browse/VFS-335
>             Project: Commons VFS
>          Issue Type: Bug
>    Affects Versions: 1.0
>            Reporter: Sebb
>
> The  MonitorInputStream.read() methods should probably be synchronised, because they override methods which are synch.

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

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (VFS-335) MonitorInputStream.read() methods should be synchronised

Gilles (Jira)
In reply to this post by Gilles (Jira)

    [ https://issues.apache.org/jira/browse/VFS-335?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12967241#action_12967241 ]

Sebb commented on VFS-335:
--------------------------

I should have mentioned that Eclipse warns about this, presumably on the basis that if the super-class method requires synch., then sub-classes overrides probably do too.

>  MonitorInputStream.read() methods should be synchronised
> ---------------------------------------------------------
>
>                 Key: VFS-335
>                 URL: https://issues.apache.org/jira/browse/VFS-335
>             Project: Commons VFS
>          Issue Type: Bug
>    Affects Versions: 1.0
>            Reporter: Sebb
>
> The  MonitorInputStream.read() methods should probably be synchronised, because they override methods which are synch.

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

Reply | Threaded
Open this post in threaded view
|

[jira] [Resolved] (VFS-335) MonitorInputStream.read() methods should be synchronised

Gilles (Jira)
In reply to this post by Gilles (Jira)

     [ https://issues.apache.org/jira/browse/VFS-335?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ralph Goers resolved VFS-335.
-----------------------------

       Resolution: Fixed
    Fix Version/s: 2.1

I have converted the variables from primitives to atomics. This eliminates the need to synchronize but it won't get rid of the Eclipse warnings.

>  MonitorInputStream.read() methods should be synchronised
> ---------------------------------------------------------
>
>                 Key: VFS-335
>                 URL: https://issues.apache.org/jira/browse/VFS-335
>             Project: Commons VFS
>          Issue Type: Bug
>    Affects Versions: 1.0
>            Reporter: Sebb
>             Fix For: 2.1
>
>
> The  MonitorInputStream.read() methods should probably be synchronised, because they override methods which are synch.

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