Return-Path: Delivered-To: apmail-commons-issues-archive@minotaur.apache.org Received: (qmail 20402 invoked from network); 15 Apr 2010 13:19:15 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 15 Apr 2010 13:19:15 -0000 Received: (qmail 53288 invoked by uid 500); 15 Apr 2010 13:19:15 -0000 Delivered-To: apmail-commons-issues-archive@commons.apache.org Received: (qmail 52354 invoked by uid 500); 15 Apr 2010 13:19: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 52340 invoked by uid 99); 15 Apr 2010 13:19:14 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 15 Apr 2010 13:19:14 +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; Thu, 15 Apr 2010 13:19:10 +0000 Received: from thor (localhost [127.0.0.1]) by thor.apache.org (8.13.8+Sun/8.13.8) with ESMTP id o3FDIml7020588 for ; Thu, 15 Apr 2010 09:18:48 -0400 (EDT) Message-ID: <485063.139981271337528357.JavaMail.jira@thor> Date: Thu, 15 Apr 2010 09:18:48 -0400 (EDT) From: "Adrian Crum (JIRA)" To: issues@commons.apache.org Subject: [jira] Commented: (LANG-618) Add an Assert class to simplify programming. In-Reply-To: <11899242.122921271274049862.JavaMail.jira@thor> 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/LANG-618?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12857304#action_12857304 ] Adrian Crum commented on LANG-618: ---------------------------------- A wrapper won't work. Let's say the bar argument is null. The Assert.argumentsNotNull method will throw an IllegalArgumentException with the message "bar cannot be null." If I have a wrapper that calls Validate.notNull, the argument name gets discarded and a NullPointerException is thrown with the message "The validated object is null." Which object was null? Foo or bar? The Assert class gives the developer more information. I'm not trying to push this btw. I'm just explaining why I prefer it. > Add an Assert class to simplify programming. > -------------------------------------------- > > Key: LANG-618 > URL: https://issues.apache.org/jira/browse/LANG-618 > Project: Commons Lang > Issue Type: New Feature > Components: lang.* > Affects Versions: 3.1 > Reporter: Adrian Crum > Priority: Minor > Attachments: LANG-618.patch > > -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira