Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 321992 - Assertion checks in Provided Capability constructor do not show which property is null
Summary: Assertion checks in Provided Capability constructor do not show which propert...
Status: CLOSED FIXED
Alias: None
Product: Equinox
Classification: Eclipse Project
Component: p2 (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.7 M5   Edit
Assignee: P2 Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-08-06 10:28 EDT by Katya Stoycheva CLA
Modified: 2011-01-19 16:19 EST (History)
3 users (show)

See Also:


Attachments
It is clearly shown which of the arguments is null and which is the provided capability by its namespace, if not null. (3.41 KB, patch)
2010-08-06 10:30 EDT, Katya Stoycheva CLA
pascal: iplog+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Katya Stoycheva CLA 2010-08-06 10:28:33 EDT
Build Identifier: I20100406-1034

All scenarios that try to create an instance of class org.eclipse.equinox.internal.p2.metadata.ProvidedCapabilty (e.g. for  defining a capability which an installable unit declares to provide in the metadata repository) by passing a null value for the namespace and/or name parameters ends up with an AssertionFailedException with a meaningless message that gives no hint which argument is null and which is the concerned capability.

Reproducible: Always

Steps to Reproduce:
1. In Eclipse IDE 3.6, run P2 product publisher application with configured standard parameters but omitting the “flavor” parameter, e.g.:
-metadataRepository file:///D:/tools (url to an existing repository)
-artifactRepository file:///D:/tools (url to an existing repository)
-productFile d:/file.product (file path to a standard product file)
-append
2. Observe the output which contains the AssertionFailedException with an unclear  message:
Status ERROR: org.eclipse.equinox.p2.artifact.repository code=0 null argument: org.eclipse.core.runtime.AssertionFailedException: null argument:
Comment 1 Katya Stoycheva CLA 2010-08-06 10:30:07 EDT
Created attachment 176039 [details]
It is clearly shown which of the arguments is null and which is the provided capability by its namespace, if not null.

Old message:
org.eclipse.core.runtime.AssertionFailedException: null argument: the namespace of the provided capabilty is not defined

New message:
org.eclipse.core.runtime.AssertionFailedException: null argument:the name of provided capability org.eclipse.equinox.p2.flavor is not defined
Comment 2 Pascal Rapicault CLA 2011-01-19 16:19:37 EST
thx for the patch.