Return-Path: Delivered-To: apmail-commons-issues-archive@locus.apache.org Received: (qmail 56556 invoked from network); 9 Nov 2008 21:33:38 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 9 Nov 2008 21:33:38 -0000 Received: (qmail 8545 invoked by uid 500); 9 Nov 2008 21:33:44 -0000 Delivered-To: apmail-commons-issues-archive@commons.apache.org Received: (qmail 8476 invoked by uid 500); 9 Nov 2008 21:33:44 -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 8465 invoked by uid 99); 9 Nov 2008 21:33:43 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 09 Nov 2008 13:33:43 -0800 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.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 09 Nov 2008 21:32:33 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 3C8A0234C289 for ; Sun, 9 Nov 2008 13:32:46 -0800 (PST) Message-ID: <1139163222.1226266366246.JavaMail.jira@brutus> Date: Sun, 9 Nov 2008 13:32:46 -0800 (PST) From: "Emmanuel Bourg (JIRA)" To: issues@commons.apache.org Subject: [jira] Updated: (CLI-170) TypeHandler prints messages to stderr In-Reply-To: <682810045.1222528664419.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/CLI-170?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Emmanuel Bourg updated CLI-170: ------------------------------- Priority: Minor (was: Major) Fix Version/s: (was: 1.2) 1.3 Issue Type: Improvement (was: Bug) > TypeHandler prints messages to stderr > ------------------------------------- > > Key: CLI-170 > URL: https://issues.apache.org/jira/browse/CLI-170 > Project: Commons CLI > Issue Type: Improvement > Components: Validation > Affects Versions: 1.2 > Reporter: J. Lewis Muir > Priority: Minor > Fix For: 1.3 > > Attachments: remove-messages-to-stderr.patch > > Original Estimate: 0.5h > Remaining Estimate: 0.5h > > Certain methods in {{TypeHandler}} print a message to stderr when they are unable to create the object they are to return. I don't think this should be. The documentation for each method clearly states that if it is unable to create the object, it returns {{null}}. If more information should be reported to the caller, these methods should be changed to throw an exception. I've removed the printing of these messages from {{TypeHandler}}. > This fix also makes the unit test output clean. Right now, certain test cases exercise the "returns {{null}}" behavior of some of the {{TypeHandler}} methods, and this causes various error messages to be written to stderr which makes the test case output look unclean and like something has gone wrong when in fact everything is working correctly. > Attached is a patch for this fix. The patch is against [http://svn.apache.org/repos/asf/commons/proper/cli/branches/cli-1.x]. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.