commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gilles (JIRA)" <>
Subject [jira] [Commented] (MATH-757) ResizableDoubleArray is not thread-safe yet has some synch. methods
Date Wed, 24 Oct 2012 12:22:12 GMT


Gilles commented on MATH-757:

I'm also wary of
* the package-scoped "getInternalLength" method,
* the "expansion mode" being represented as an "int" (and being mutable).

To KISS, I think that we should mimic the standard "Collections" API (as was done in "Commons
Primitives") and hide/encapsulate everything else (i.e. set the behaviour at construction

For better separation of concerns, I'd also suggest to move all "rolling" features to a new
class that would inherit from a trimmed-down "ResizableDoubleArray" (i.e. only concerned with,
hmm, resizable array features, à la "Commons Primitives").

> ResizableDoubleArray is not thread-safe yet has some synch. methods
> -------------------------------------------------------------------
>                 Key: MATH-757
>                 URL:
>             Project: Commons Math
>          Issue Type: Bug
>            Reporter: Sebb
>             Fix For: 3.1
> 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
For more information on JIRA, see:

View raw message