You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@felix.apache.org by "Carsten Ziegeler (JIRA)" <ji...@apache.org> on 2014/01/15 20:23:21 UTC

[jira] [Resolved] (FELIX-4388) Initial start level not considered when bundle.start() is called

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

Carsten Ziegeler resolved FELIX-4388.
-------------------------------------

    Resolution: Fixed
      Assignee: Carsten Ziegeler

Thanks Richard, I've applied the patch.

Yes, this used to work in previous versions (3.x)

> Initial start level not considered when bundle.start() is called
> ----------------------------------------------------------------
>
>                 Key: FELIX-4388
>                 URL: https://issues.apache.org/jira/browse/FELIX-4388
>             Project: Felix
>          Issue Type: Bug
>          Components: Framework
>    Affects Versions: framework-4.2.0
>            Reporter: Carsten Ziegeler
>            Assignee: Carsten Ziegeler
>            Priority: Minor
>             Fix For: framework-4.4.0
>
>
> If a start level service is available, and the initial start level is set to a higher level than the current one, a call to bundle.start() of a bundle which has no start level defined, results in the bundle being immediately started.
> However, according to the spec it should only be started when the initial start level is reached.
> I think this is a bug in BundleImpl as it is returning -1 if no start level is set for the bundle instead of the default level. This patch should fix this:
> Index: src/main/java/org/apache/felix/framework/BundleImpl.java
> ===================================================================
> --- src/main/java/org/apache/felix/framework/BundleImpl.java	(Revision 1558397)
> +++ src/main/java/org/apache/felix/framework/BundleImpl.java	(Arbeitskopie)
> @@ -861,7 +861,12 @@
>      {
>          try
>          {
> -            return m_archive.getStartLevel();
> +            int level = m_archive.getStartLevel();
> +            if ( level == -1 )
> +            {
> +                level = defaultLevel;
> +            }
> +            return level;
>          }
>          catch (Exception ex)
>          {



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)