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

Bug 337634

Summary: Irritating message: X illegally implements Y via Z
Product: [Eclipse Project] PDE Reporter: Gunnar Wagenknecht <gunnar>
Component: API ToolsAssignee: PDE API Tools Inbox <pde-apitools-inbox>
Status: RESOLVED WORKSFORME QA Contact:
Severity: normal    
Priority: P3 CC: dj.houghton, Michael_Rennie, pwebster, remy.suen, tjwatson
Version: 3.7   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:
Bug Depends on:    
Bug Blocks: 337635    

Description Gunnar Wagenknecht CLA 2011-02-19 07:46:53 EST
3.7M5

I have a class which implements IEclipsePreferences. IEclipsePreferences says "Clients may implement this interface." IEclipsePreferences extends org.osgi.service.prefs.Preferences which is marked "@noimplement".

Who is right .. API Tooling or IEclipsePreferences?
Comment 1 Thomas Watson CLA 2011-02-21 08:49:33 EST
Well in this case it appears they we have a conflict in our API from equinox and the API we extend from OSGi.  From the OSGi point of view the only implementers of the org.osgi.service.prefs.Preferences service should be the bundle that is actually implementing the preferences service (org.eclipse.equinox.preferences) and not any clients.

The problem is org.eclipse.equinox.preferences provides an interface that extends the org.osgi.service.prefs.Preferences interfaces and allows it to be implemented by clients.  The risk we run with such an API is that OSGi may decide to add a method to org.osgi.service.prefs.Preferences which will end up breaking any implementers of org.eclipse.core.runtime.preferences.IEclipsePreferences.

At this point the org.osgi.service.prefs.Preferences has been pretty stable and has not changed, but OSGi does have the freedom to change this if the need arises.  For this bug I am not sure what API tooling can do, it sees this inconsistency and is reporting it.
Comment 2 Michael Rennie CLA 2011-02-21 21:29:58 EST
In this case, there is an API inconsistency, but it is accepted. Your only remedy is to add an API problem filter.

Marking as WORKSFORME