You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@felix.apache.org by "Lazar Kirchev (JIRA)" <ji...@apache.org> on 2013/04/23 15:35:15 UTC

[jira] [Comment Edited] (FELIX-3979) Gogo must support method names with both uppercase and lowercase

    [ https://issues.apache.org/jira/browse/FELIX-3979?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13639046#comment-13639046 ] 

Lazar Kirchev edited comment on FELIX-3979 at 4/23/13 1:33 PM:
---------------------------------------------------------------

This is related only with the displayed help - all commands are registered and can be called.
The problem with the help was that in Gogo the commands are case insensitive and Gogo stores the names of the registered commands in the ".commands" session variable all-lowercase. However, felix:help command is case sensitive. So getting the command names from the Gogo .commands variable and calling for each name felix:help <command_name> causes that a command name, which is mixed-case (but all-lowercase in the .commands value) not to be found by felix:help.  

If you register a command runAsEmbeddables, you can call it both with runAsEmbeddables and runasembeddables, and it will be executed. But calling felix:help runAsEmbeddables will return the help message of the command, while felix:help runasembeddables will not return anything. Should this be so by design?
                
      was (Author: lkirchev):
    This is related only with the displayed help - all commands are registered and can be called.
The problem with the help was that in Gogo the commands are case insensitive and Gogo stores the names of the registered commands in the ".commands" session variable all-lowercase. However, felix:help command is case sensitive. So getting the command names from the Gogo .commands variable and calling for each name felix:help <command_name> causes that a command name, which is mixed-case (but all-lowercase in the .commands value) not to be found by felix:help.  
                  
> Gogo must support method names with both uppercase and lowercase
> ----------------------------------------------------------------
>
>                 Key: FELIX-3979
>                 URL: https://issues.apache.org/jira/browse/FELIX-3979
>             Project: Felix
>          Issue Type: Bug
>          Components: Gogo Command, Gogo Runtime
>    Affects Versions: gogo.command-0.12.0, gogo.runtime-0.10.0
>         Environment: Equinox Kepler
>            Reporter: Cristiano GaviĆ£o
>            Priority: Critical
>         Attachments: org.jbehave.osgi.commands.zip
>
>
> When I tried to register the method below Gogo ignored it:
> @Descriptor("Run stories with an annotated embedder runner.")
>     public void runStoriesWithAnnotatedEmbedderRunner(@Descriptor("class names") String classNames) {
>     }
> Even when I used these function names: "runstorieswithannotatedembedderrunner" or "runStoriesWithAnnotatedEmbedderRunner" 
> If I refactor both the method and function names to all lowercase than Gogo accepts it.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira