[
https://issues.apache.org/jira/browse/FELIX-910?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Felix Meschberger updated FELIX-910:
------------------------------------
Attachment: FELIX-910.patch
Proposed patch: The state variable is not final again and set to the actual
state after calling the init() method.
> Framework may ignore framework startlevel on startup
> ----------------------------------------------------
>
> Key: FELIX-910
> URL: https://issues.apache.org/jira/browse/FELIX-910
> Project: Felix
> Issue Type: Bug
> Components: Framework
> Affects Versions: felix-1.6.0
> Reporter: Felix Meschberger
> Fix For: felix-1.6.0
>
> Attachments: FELIX-910.patch
>
>
> When calling the Felix.start() method, a check is done, whether the init
> method must be called. After that, the state is checked again to see whether
> it is STARTING and hence the framework target startlevel should be set
> according to the org.osgi.framework.startlevel property:
> final int state = getState();
> if ((state == Bundle.INSTALLED) || (state == Bundle.RESOLVED)) {
> init();
> }
> if (state == Bundle.STARTING) {
> ....
> Unfortunately this code is broken, since the state variable is still
> INSTALLED or RESOLVED after the init() method has been called even though the
> actual state really is STARTING.
> A workaround for client code encountering this issue, is to call the init()
> method itself as in :
> Felix felix = new Felix(map);
> felix.init();
> felix.start();
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.