felix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Guillaume Nodet (JIRA)" <j...@apache.org>
Subject [jira] [Closed] (FELIX-4411) "null" Bundle-Activator causes exception if assertions turned on
Date Tue, 17 Jun 2014 11:32:02 GMT

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

Guillaume Nodet closed FELIX-4411.

    Resolution: Duplicate

> "null" Bundle-Activator causes exception if assertions turned on
> ----------------------------------------------------------------
>                 Key: FELIX-4411
>                 URL: https://issues.apache.org/jira/browse/FELIX-4411
>             Project: Felix
>          Issue Type: Bug
>          Components: Maven Bundle Plugin
>    Affects Versions: maven-bundle-plugin-2.4.0
>            Reporter: Daniel Kulp
> In our top level pom, we have the maven-bundle-plugin with an instruction like:
> {code:xml}
> <Bundle-Activator>${cxf.bundle.activator}</Bundle-Activator>
> {code}
> and a property of:
> {code:xml}
> <cxf.bundle.activator />
> {code}
> which works fine.  Bundles that have an activator just add a property in their pom and
it's picked up, bundles without one don't define a property and it all seems to work.
> HOWEVER, if run with MAVEN_OPTS="-ea", the bundle plugin throws an exception.   The problem
is technically in bnd.     In aQute.bnd.osgi.Analyzer.analyze(), it calls:
> {code:java}
> 			String s = getProperty(BUNDLE_ACTIVATOR);
> 			if (s != null) {
> activator = getTypeRefFromFQN(s);
> 				referTo(activator);
> 				trace("activator %s %s", s, activator);
> 			}
> {code}
> however, the return from the getProperty(..) call is an empty string, not null.
> It may be good if the bundle-plugin would filter out the empty strings or nulls in cases
like this where we know it wouldn't be valid.  That said, a fix in bnd would be good as well.

This message was sent by Atlassian JIRA

View raw message