Return-Path: Delivered-To: apmail-hadoop-common-issues-archive@minotaur.apache.org Received: (qmail 5083 invoked from network); 15 Mar 2011 23:07:51 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 15 Mar 2011 23:07:51 -0000 Received: (qmail 99224 invoked by uid 500); 15 Mar 2011 23:07:51 -0000 Delivered-To: apmail-hadoop-common-issues-archive@hadoop.apache.org Received: (qmail 99194 invoked by uid 500); 15 Mar 2011 23:07:51 -0000 Mailing-List: contact common-issues-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: common-issues@hadoop.apache.org Delivered-To: mailing list common-issues@hadoop.apache.org Received: (qmail 99186 invoked by uid 99); 15 Mar 2011 23:07:51 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 15 Mar 2011 23:07:51 +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; Tue, 15 Mar 2011 23:07:50 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id 9C3813ABEAD for ; Tue, 15 Mar 2011 23:07:29 +0000 (UTC) Date: Tue, 15 Mar 2011 23:07:29 +0000 (UTC) From: "Tsz Wo (Nicholas), SZE (JIRA)" To: common-issues@hadoop.apache.org Message-ID: <1942992605.5404.1300230449635.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <1975706251.11966.1299795239567.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] Commented: (HADOOP-7180) Improve CommandFormat MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/HADOOP-7180?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13007263#comment-13007263 ] Tsz Wo (Nicholas), SZE commented on HADOOP-7180: ------------------------------------------------ - Please use junit 4 (i.e. {{org.junit.Test}} and other classes {{org.junit.*}} instead of {{junit.framework.TestCase}}) - All public classes and methods (except tests) must have javadoc. - How about passing {{minPar}}/{{maxPar}} and {{psize}} to {{NotEnoughArgumentsException}}/{{TooManyArgumentsException}} and then shows the numbers in the error messages? - Minor: how about passing {{pos}} to {{parse(List args)}}, so that we could just return {{parse(Arrays.asList(args), pos)}} in {{parse(String[] args, int pos)}}? > Improve CommandFormat > --------------------- > > Key: HADOOP-7180 > URL: https://issues.apache.org/jira/browse/HADOOP-7180 > Project: Hadoop Common > Issue Type: Improvement > Components: fs > Reporter: Daryn Sharp > Assignee: Daryn Sharp > Fix For: 0.23.0 > > Attachments: HADOOP-7180.patch > > > CommandFormat currently takes an array and offset for parsing and returns a list of arguments. It'd be much more convenient to have it process a list too. It would also be nice to differentiate between too few and too many args instead of the generic "Illegal number of arguments". Finally, CommandFormat is completely devoid of tests. -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira