felix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Richard S. Hall (JIRA)" <j...@apache.org>
Subject [jira] Resolved: (FELIX-473) ClassCastException in org.apache.felix.shell ShellServiceImpl getCommandReference
Date Wed, 30 Jan 2008 22:13:34 GMT

     [ https://issues.apache.org/jira/browse/FELIX-473?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel

Richard S. Hall resolved FELIX-473.

    Resolution: Fixed
      Assignee: Richard S. Hall

Yes, this is a old bug that was recreated during some code refactoring, apparently. Since
the method is not really used, no one ever noticed. I have had some ideas for an improved
shell service for a long time, but that is another story for another JIRA issue. :-)

I applied your patch...thanks. Please close the issue if you are satisfied with it.

> ClassCastException in org.apache.felix.shell ShellServiceImpl getCommandReference
> ---------------------------------------------------------------------------------
>                 Key: FELIX-473
>                 URL: https://issues.apache.org/jira/browse/FELIX-473
>             Project: Felix
>          Issue Type: Bug
>            Reporter: Nektarios K. Papadopoulos
>            Assignee: Richard S. Hall
>            Priority: Minor
>         Attachments: getCommandReference.patch
> The implementation is obviously wrong, since m_commandNameMap contains Command object,
not ServiceReference ones.
> The bug is inherited from Oscar, but the resolution would have been cleaner back then,
since the ServiceReference was readily available in the (now abandoned) CommandRecord objects
the Map used to hold.
> Nevertheless, the solution is to iterate through the Map.Entry's of the m_commandRefMap
entrySet and compare the command names one by one.
> Apparently no one ever uses this method, so the complexity/performance-penalty of the
suggested solution is not an issue.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message