Return-Path: X-Original-To: apmail-felix-dev-archive@www.apache.org Delivered-To: apmail-felix-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id A5E3F458B for ; Sun, 12 Jun 2011 14:03:17 +0000 (UTC) Received: (qmail 16016 invoked by uid 500); 12 Jun 2011 14:03:17 -0000 Delivered-To: apmail-felix-dev-archive@felix.apache.org Received: (qmail 15972 invoked by uid 500); 12 Jun 2011 14:03:17 -0000 Mailing-List: contact dev-help@felix.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@felix.apache.org Delivered-To: mailing list dev@felix.apache.org Received: (qmail 15964 invoked by uid 99); 12 Jun 2011 14:03:17 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 12 Jun 2011 14:03:17 +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, 12 Jun 2011 14:03:16 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id 3042D41582D for ; Sun, 12 Jun 2011 14:02:56 +0000 (UTC) Date: Sun, 12 Jun 2011 14:02:53 +0000 (UTC) From: "Derek Baum (JIRA)" To: dev@felix.apache.org Message-ID: <1412264667.898.1307887376193.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <187056438.19337.1301420465799.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Resolved] (FELIX-2894) Gogo does not handles options but not parameters 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/FELIX-2894?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Derek Baum resolved FELIX-2894. ------------------------------- Resolution: Fixed Fix Version/s: gogo.runtime-0.10.0 added new testcases for argument coercion, including Parameters. Refactored Reflective.java to simplify code. > Gogo does not handles options but not parameters > ------------------------------------------------ > > Key: FELIX-2894 > URL: https://issues.apache.org/jira/browse/FELIX-2894 > Project: Felix > Issue Type: Bug > Components: Gogo Runtime > Reporter: Peter Kriens > Assignee: Derek Baum > Fix For: gogo.runtime-0.10.0 > > > If you create a function with a parameter then the correct method cannot be found: > public void xyz( @Parameter( names="-v", absentValue="absent") String string ) { return string; } > This method is not found for xyz -v abc > There were two bugs in the code: > - annotation values can never be null but null was checked for the presentValue to see if it was not there. > - After handling the parameters the new length of the command line was checked against the xargs. However, this still contained the parameter name + value. So the size was too high to match. > I've added a check for the Parameter.UNSPECIFIED when checking the status of presentValue and I removed the check for the length of xargs, only types is relevant I think. However, might need some other pair of eyes -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira