You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@felix.apache.org by "jamie campbell (JIRA)" <ji...@apache.org> on 2011/02/23 22:46:38 UTC

[jira] Created: (FELIX-2860) getLocales() in DefaultMetaTypeProvider needs to check return of findEntries

getLocales() in DefaultMetaTypeProvider needs to check return of findEntries
----------------------------------------------------------------------------

                 Key: FELIX-2860
                 URL: https://issues.apache.org/jira/browse/FELIX-2860
             Project: Felix
          Issue Type: Bug
          Components: Metatype Service
    Affects Versions: metatype-1.0.4
         Environment: ubuntu 10.04
            Reporter: jamie campbell


DefaultMetaTypeProvider:128 does a findEntries call which it then uses at 130 , but assumes that it will always be non-null.  findEntries can, and does, return null.

If it helps, I encountered this problem in felix karaf 2.1.4, when I added a bundle to the system to iterate on MetaType information for all the ManagedService and ManagedServiceFactory bundles in the system, IF they also had an associated configuration (even an empty one should be iterable to a limited extent, aka, recognizing that it has a configuration).  All the bundles successfully iterated except for FileInstall 3.1.10.  This may or may not imply that there is also a bug in FileInstall 3.1.10.

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Resolved: (FELIX-2860) getLocales() in DefaultMetaTypeProvider needs to check return of findEntries

Posted by "Felix Meschberger (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/FELIX-2860?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Felix Meschberger resolved FELIX-2860.
--------------------------------------

       Resolution: Fixed
    Fix Version/s:  metatype-1.0.6

Thanks for reporting this issue. Good catch !

I have fixed this in Rev. 1074087 guarding against a null enumeration

> getLocales() in DefaultMetaTypeProvider needs to check return of findEntries
> ----------------------------------------------------------------------------
>
>                 Key: FELIX-2860
>                 URL: https://issues.apache.org/jira/browse/FELIX-2860
>             Project: Felix
>          Issue Type: Bug
>          Components: Metatype Service
>    Affects Versions: metatype-1.0.4
>         Environment: ubuntu 10.04
>            Reporter: jamie campbell
>            Assignee: Felix Meschberger
>             Fix For:  metatype-1.0.6
>
>
> DefaultMetaTypeProvider:128 does a findEntries call which it then uses at 130 , but assumes that it will always be non-null.  findEntries can, and does, return null.
> If it helps, I encountered this problem in felix karaf 2.1.4, when I added a bundle to the system to iterate on MetaType information for all the ManagedService and ManagedServiceFactory bundles in the system, IF they also had an associated configuration (even an empty one should be iterable to a limited extent, aka, recognizing that it has a configuration).  All the bundles successfully iterated except for FileInstall 3.1.10.  This may or may not imply that there is also a bug in FileInstall 3.1.10.

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Closed] (FELIX-2860) getLocales() in DefaultMetaTypeProvider needs to check return of findEntries

Posted by "Felix Meschberger (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/FELIX-2860?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Felix Meschberger closed FELIX-2860.
------------------------------------


Close after release
                
> getLocales() in DefaultMetaTypeProvider needs to check return of findEntries
> ----------------------------------------------------------------------------
>
>                 Key: FELIX-2860
>                 URL: https://issues.apache.org/jira/browse/FELIX-2860
>             Project: Felix
>          Issue Type: Bug
>          Components: Metatype Service
>    Affects Versions: metatype-1.0.4
>         Environment: ubuntu 10.04
>            Reporter: jamie campbell
>            Assignee: Felix Meschberger
>             Fix For:  metatype-1.0.6
>
>
> DefaultMetaTypeProvider:128 does a findEntries call which it then uses at 130 , but assumes that it will always be non-null.  findEntries can, and does, return null.
> If it helps, I encountered this problem in felix karaf 2.1.4, when I added a bundle to the system to iterate on MetaType information for all the ManagedService and ManagedServiceFactory bundles in the system, IF they also had an associated configuration (even an empty one should be iterable to a limited extent, aka, recognizing that it has a configuration).  All the bundles successfully iterated except for FileInstall 3.1.10.  This may or may not imply that there is also a bug in FileInstall 3.1.10.

--
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

[jira] Commented: (FELIX-2860) getLocales() in DefaultMetaTypeProvider needs to check return of findEntries

Posted by "jamie campbell (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FELIX-2860?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12998611#comment-12998611 ] 

jamie campbell commented on FELIX-2860:
---------------------------------------

regarding my last sentence about possible bug in FileInstall 3.1.10 : it isn't.  FileInstall's metatype.xml doesn't specify a localization entry, which the xml schema in the compendium spec says is fine (aka, it's optional).  As a result, the MetaType service "guesses" using Constants.BUNDLE_LOCALIZATION_DEFAULT_BASENAME (OSGI-INF/l10n/bundle), but FileInstall has nothing there either (which is still fine).  So, we arrive back at needing to handle the case where not specifying localization means there really really isn't localization (aka, the null case).

> getLocales() in DefaultMetaTypeProvider needs to check return of findEntries
> ----------------------------------------------------------------------------
>
>                 Key: FELIX-2860
>                 URL: https://issues.apache.org/jira/browse/FELIX-2860
>             Project: Felix
>          Issue Type: Bug
>          Components: Metatype Service
>    Affects Versions: metatype-1.0.4
>         Environment: ubuntu 10.04
>            Reporter: jamie campbell
>
> DefaultMetaTypeProvider:128 does a findEntries call which it then uses at 130 , but assumes that it will always be non-null.  findEntries can, and does, return null.
> If it helps, I encountered this problem in felix karaf 2.1.4, when I added a bundle to the system to iterate on MetaType information for all the ManagedService and ManagedServiceFactory bundles in the system, IF they also had an associated configuration (even an empty one should be iterable to a limited extent, aka, recognizing that it has a configuration).  All the bundles successfully iterated except for FileInstall 3.1.10.  This may or may not imply that there is also a bug in FileInstall 3.1.10.

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Assigned: (FELIX-2860) getLocales() in DefaultMetaTypeProvider needs to check return of findEntries

Posted by "Felix Meschberger (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/FELIX-2860?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Felix Meschberger reassigned FELIX-2860:
----------------------------------------

    Assignee: Felix Meschberger

> getLocales() in DefaultMetaTypeProvider needs to check return of findEntries
> ----------------------------------------------------------------------------
>
>                 Key: FELIX-2860
>                 URL: https://issues.apache.org/jira/browse/FELIX-2860
>             Project: Felix
>          Issue Type: Bug
>          Components: Metatype Service
>    Affects Versions: metatype-1.0.4
>         Environment: ubuntu 10.04
>            Reporter: jamie campbell
>            Assignee: Felix Meschberger
>
> DefaultMetaTypeProvider:128 does a findEntries call which it then uses at 130 , but assumes that it will always be non-null.  findEntries can, and does, return null.
> If it helps, I encountered this problem in felix karaf 2.1.4, when I added a bundle to the system to iterate on MetaType information for all the ManagedService and ManagedServiceFactory bundles in the system, IF they also had an associated configuration (even an empty one should be iterable to a limited extent, aka, recognizing that it has a configuration).  All the bundles successfully iterated except for FileInstall 3.1.10.  This may or may not imply that there is also a bug in FileInstall 3.1.10.

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira