From issues-return-2595-apmail-commons-issues-archive=commons.apache.org@commons.apache.org Mon Feb 04 04:25:35 2008 Return-Path: Delivered-To: apmail-commons-issues-archive@locus.apache.org Received: (qmail 99037 invoked from network); 4 Feb 2008 04:25:35 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 4 Feb 2008 04:25:35 -0000 Received: (qmail 22623 invoked by uid 500); 4 Feb 2008 04:25:25 -0000 Delivered-To: apmail-commons-issues-archive@commons.apache.org Received: (qmail 22531 invoked by uid 500); 4 Feb 2008 04:25:25 -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 22521 invoked by uid 99); 4 Feb 2008 04:25:25 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 03 Feb 2008 20:25:25 -0800 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO brutus.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 04 Feb 2008 04:25:18 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id DDBCD71406D for ; Sun, 3 Feb 2008 20:25:10 -0800 (PST) Message-ID: <21236178.1202099110899.JavaMail.jira@brutus> Date: Sun, 3 Feb 2008 20:25:10 -0800 (PST) From: "Sebb (JIRA)" To: issues@commons.apache.org Subject: [jira] Updated: (MATH-188) Make Complex and Fraction classes immutable and thus thread-safe In-Reply-To: <6790227.1202092867548.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/MATH-188?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Sebb updated MATH-188: ---------------------- Attachment: Fraction.patch > Make Complex and Fraction classes immutable and thus thread-safe > ---------------------------------------------------------------- > > Key: MATH-188 > URL: https://issues.apache.org/jira/browse/MATH-188 > Project: Commons Math > Issue Type: Improvement > Reporter: Sebb > Attachments: Fraction.patch > > > There are many classes with instance fields that could be made final. > Two in particular seem like ideal candidates: > Complex - fields: real, imaginary > Fraction - fields: numerator, denominator (the private reduce() method also needs to be inlined) > As far as I can tell, making the above changes makes the classes immutable and therefore threadsafe. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.