Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 330775 - The "packageImports must not contain duplicate items" message should name the duplicate import
Summary: The "packageImports must not contain duplicate items" message should name the...
Status: NEW
Alias: None
Product: Virgo
Classification: RT
Component: unknown (show other bugs)
Version: 2.1.0.RELEASE   Edit
Hardware: PC Windows XP
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-11-22 04:18 EST by Barend Garvelink CLA
Modified: 2010-11-22 04:18 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Barend Garvelink CLA 2010-11-22 04:18:32 EST
If an OSGi bundle includes a duplicate entry in the Import-Package header of its Manifest*, Virgo throws a FatalAssertionException with the message "input packageImports must not contain duplicate items".

This duplication check is done in the convertImportedPackageListToMap(List) method of org.eclipse.virgo.kernel.userregion.internal.importexpansion.AbstractTrackedPackageImports. The error message text is defined at the same place.

Diagnosing this error would be a lot easier if the name of package of which a duplicate import was found were concatenated to the exception message.

* Apache Log4j 1.2.16 is an offender, importing com.sun.jdmk.comm twice.