[
https://issues.apache.org/jira/browse/MATH-757?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13221306#comment-13221306
]
Thomas Neidhart commented on MATH-757:
--------------------------------------
As far as I have seen, all methods that change an internal state use a lock in
some way:
* using synchronized modifier
* synchronized(this) block
The only methods that are not synchronized just return some (immutable)
parameters of the class wrt array expansion strategy. So imo the class should
be thread-safe.
> ResizableDoubleArray is not thread-safe yet has some synch. methods
> -------------------------------------------------------------------
>
> Key: MATH-757
> URL: https://issues.apache.org/jira/browse/MATH-757
> Project: Commons Math
> Issue Type: Bug
> Reporter: Sebb
>
> ResizableDoubleArray has several synchronised methods, but is not
> thread-safe, because class variables are not always accessed using the lock.
> Is the class supposed to be thread-safe?
> If so, all accesses (read and write) need to be synch.
> If not, the synch. qualifiers could be dropped.
> In any case, the protected fields need to be made private.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira