[
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