You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@felix.apache.org by "Thomas Watson (JIRA)" <ji...@apache.org> on 2017/01/04 17:31:58 UTC

[jira] [Resolved] (FELIX-5474) Do not call no-arg Bundle.getHeaders() method

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

Thomas Watson resolved FELIX-5474.
----------------------------------
    Resolution: Fixed

I replaced all calls to getHeaders() with getHeaders("").  I also replaced all calls to getHeaders() which were looking up the Bundle-Version value.  I changed these to call Bundle.getVersion().

> Do not call no-arg Bundle.getHeaders() method
> ---------------------------------------------
>
>                 Key: FELIX-5474
>                 URL: https://issues.apache.org/jira/browse/FELIX-5474
>             Project: Felix
>          Issue Type: Bug
>          Components: Declarative Services (SCR)
>    Affects Versions: scr-2.0.6
>            Reporter: Thomas Watson
>            Assignee: Thomas Watson
>
> Calling Bundle.getHeaders() method requires additional work by the framework in order to search for translation resources for the bundle headers.  For SCR the headers that are looked up must never be translated (for Service-Component and Bundle-ActivationPolicy).  Only the raw values must be used from the original bundle manifest.
> Instead of using Bundle.getHeaders() the method Bundle.getHeaders(String locale) should be used with an empty string (bundle.getHeaders("")).  This returns the raw headers without requiring the framework to do a locale resource lookup.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)