Return-Path: Delivered-To: apmail-incubator-pig-dev-archive@locus.apache.org Received: (qmail 65782 invoked from network); 12 Jun 2008 11:53:07 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 12 Jun 2008 11:53:07 -0000 Received: (qmail 85615 invoked by uid 500); 12 Jun 2008 11:53:09 -0000 Delivered-To: apmail-incubator-pig-dev-archive@incubator.apache.org Received: (qmail 85584 invoked by uid 500); 12 Jun 2008 11:53:09 -0000 Mailing-List: contact pig-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: pig-dev@incubator.apache.org Delivered-To: mailing list pig-dev@incubator.apache.org Received: (qmail 85573 invoked by uid 99); 12 Jun 2008 11:53:09 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 12 Jun 2008 04:53:09 -0700 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; Thu, 12 Jun 2008 11:52:28 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 7C424234C137 for ; Thu, 12 Jun 2008 04:52:46 -0700 (PDT) Message-ID: <700088737.1213271566507.JavaMail.jira@brutus> Date: Thu, 12 Jun 2008 04:52:46 -0700 (PDT) From: "Pi Song (JIRA)" To: pig-dev@incubator.apache.org Subject: [jira] Commented: (PIG-256) support non default constructor with variable number of arguments In-Reply-To: <1276329811.1212649425044.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/PIG-256?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12604497#action_12604497 ] Pi Song commented on PIG-256: ----------------------------- Committed. Thanks Olga for review. > support non default constructor with variable number of arguments > ----------------------------------------------------------------- > > Key: PIG-256 > URL: https://issues.apache.org/jira/browse/PIG-256 > Project: Pig > Issue Type: Improvement > Reporter: Ajay Garg > Priority: Minor > Attachments: PIG_256_vararg_instantiation.patch > > > pig does not support non default constructor with variable number of arguments support. In our case we need this because the number of variables that are specified by the user are varying. The fix is simple. Pig calls getConstr("agr1","arg2",...,"argn") and if it doesn't find it throws a noSuchMethodFound exception. In the catch block we just need to add code to check if we can wrap the arg1..n in a String[] and check if a constructor can be found with this signature getConstr(args[]). This would resolve the variable num args issue. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.