Return-Path: X-Original-To: apmail-commons-issues-archive@minotaur.apache.org Delivered-To: apmail-commons-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id D1BD9DC40 for ; Tue, 23 Oct 2012 12:11:15 +0000 (UTC) Received: (qmail 85019 invoked by uid 500); 23 Oct 2012 12:11:15 -0000 Delivered-To: apmail-commons-issues-archive@commons.apache.org Received: (qmail 84523 invoked by uid 500); 23 Oct 2012 12:11:14 -0000 Mailing-List: contact issues-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: issues@commons.apache.org Delivered-To: mailing list issues@commons.apache.org Received: (qmail 84497 invoked by uid 99); 23 Oct 2012 12:11:14 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 23 Oct 2012 12:11:14 +0000 Date: Tue, 23 Oct 2012 12:11:14 +0000 (UTC) From: "Gilles (JIRA)" To: issues@commons.apache.org Message-ID: <925489845.15558.1350994274295.JavaMail.jiratomcat@arcas> In-Reply-To: <1470622966.14383.1330726199147.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Commented] (MATH-757) ResizableDoubleArray is not thread-safe yet has some synch. methods MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/MATH-757?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13482280#comment-13482280 ] Gilles commented on MATH-757: ----------------------------- The class is also more complicated than necessary by having public and protected setters for variables that are only set at construction. Removing those would allow making the corresponding fields private (and thus getting closer to the goal of thread-safety, by immutability). > 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 > 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: http://www.atlassian.com/software/jira