Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 330775

Summary: The "packageImports must not contain duplicate items" message should name the duplicate import
Product: [RT] Virgo Reporter: Barend Garvelink <barend.garvelink>
Component: unknownAssignee: Project Inbox <virgo-inbox>
Status: NEW --- QA Contact:
Severity: enhancement    
Priority: P3    
Version: 2.1.0.RELEASE   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:

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.