Return-Path: Delivered-To: apmail-commons-issues-archive@minotaur.apache.org Received: (qmail 27818 invoked from network); 6 Mar 2011 14:02:49 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 6 Mar 2011 14:02:49 -0000 Received: (qmail 73630 invoked by uid 500); 6 Mar 2011 14:02:48 -0000 Delivered-To: apmail-commons-issues-archive@commons.apache.org Received: (qmail 73570 invoked by uid 500); 6 Mar 2011 14:02:48 -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 73562 invoked by uid 99); 6 Mar 2011 14:02:48 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 06 Mar 2011 14:02:48 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,T_RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 06 Mar 2011 14:02:46 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id 1386C5AB73 for ; Sun, 6 Mar 2011 14:02:25 +0000 (UTC) Date: Sun, 6 Mar 2011 14:02:25 +0000 (UTC) From: "Gilles (JIRA)" To: issues@commons.apache.org Message-ID: <1931986411.80.1299420145076.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] Commented: (MATH-403) Never propagate a "NullPointerException" resulting from bad usage of the API 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-403?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13003174#comment-13003174 ] Gilles commented on MATH-403: ----------------------------- Discussion is ongoing on whether we should really _always_ check for "null". For those cases where it will make the failure closer to the source of the problem (the uninitialized reference), a "checkNotNull" utility method will added in "MathUtils". > Never propagate a "NullPointerException" resulting from bad usage of the API > ---------------------------------------------------------------------------- > > Key: MATH-403 > URL: https://issues.apache.org/jira/browse/MATH-403 > Project: Commons Math > Issue Type: Task > Reporter: Gilles > Priority: Minor > Fix For: 3.0 > > > Package "exception" contains a class named "NullArgumentException" meant to signal that an argument was "null" where it shouldn't have been. > For consistency, every method of the API should be checked for "null" arguments and throw "NullArgumentException" appropriately. > This means hunting down all unchecked uses of references. Is there a tool that will report those? -- This message is automatically generated by JIRA. - For more information on JIRA, see: http://www.atlassian.com/software/jira