Return-Path: Delivered-To: apmail-commons-issues-archive@minotaur.apache.org Received: (qmail 36925 invoked from network); 3 Nov 2010 16:11:44 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 3 Nov 2010 16:11:44 -0000 Received: (qmail 41823 invoked by uid 500); 3 Nov 2010 16:12:15 -0000 Delivered-To: apmail-commons-issues-archive@commons.apache.org Received: (qmail 41726 invoked by uid 500); 3 Nov 2010 16:12: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 41212 invoked by uid 99); 3 Nov 2010 16:12:13 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 03 Nov 2010 16:12:13 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.22] (HELO thor.apache.org) (140.211.11.22) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 03 Nov 2010 16:12:11 +0000 Received: from thor (localhost [127.0.0.1]) by thor.apache.org (8.13.8+Sun/8.13.8) with ESMTP id oA3GBnUJ019327 for ; Wed, 3 Nov 2010 16:11:49 GMT Message-ID: <32873855.221051288800709549.JavaMail.jira@thor> Date: Wed, 3 Nov 2010 12:11:49 -0400 (EDT) From: "Gilles (JIRA)" To: issues@commons.apache.org Subject: [jira] Commented: (MATH-195) Inconsistencies in the Exception hierarchy In-Reply-To: <337154321.1203533743755.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/MATH-195?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12927890#action_12927890 ] Gilles commented on MATH-195: ----------------------------- It is bad because it is harder to maintain (as I'm well aware because of the numerous repetitive changes I've performed): The "throws" clause can contradict the Javadoc. It is more important (by policy) to have the documentation right. If it is, the clause is redundant and if it isn't, a user cannot know which one is right. For the developer, it is two places to be kept in sync with no added benefits. > Inconsistencies in the Exception hierarchy > ------------------------------------------ > > Key: MATH-195 > URL: https://issues.apache.org/jira/browse/MATH-195 > Project: Commons Math > Issue Type: Improvement > Affects Versions: 1.1, 1.2, 2.0, Nightly Builds > Reporter: Thomas Chust > Assignee: Gilles > Priority: Minor > Fix For: 3.0 > > Original Estimate: 0.17h > Remaining Estimate: 0.17h > > I think there are some inconsistencies in the hierarchy of exceptions used by the Commons Math library which could easily be fixed: > - org.apache.commons.math.linear.MatrixIndexException should really be a subclass of > java.lang.IndexOutOfBoundsException. > - Either org.apache.commons.math.linear.InvalidMatrixException should be checked or > org.apache.commons.math.random.NotPositiveDefiniteMatrixException and > org.apache.commons.math.geometry.NotARotationMatrixException should be unchecked, but in any case the latter two > should be subclasses of the former. An unchecked InvalidMatrixException should probably be a subclass of > java.lang.ArithmeticException while a checked InvalidMatrixException should be a subclass of > org.apache.commons.math.MathException. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.