felix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Carsten Ziegeler (JIRA)" <j...@apache.org>
Subject [jira] [Closed] (FELIX-4388) Initial start level not considered when bundle.start() is called
Date Mon, 27 Apr 2015 07:05:39 GMT

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

Carsten Ziegeler closed FELIX-4388.
-----------------------------------

> 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.3.4#6332)

Mime
View raw message