Bug 558477 - Incorrect Type implements non-API interface warnings/errors when @noimplement's implementation in same bundle
Summary: Incorrect Type implements non-API interface warnings/errors when @noimplement...
Status: NEW
Alias: None
Product: PDE
Classification: Eclipse Project
Component: API Tools (show other bugs)
Version: 4.7   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Vikas Chandra CLA
QA Contact:
URL:
Whiteboard: stalebug
Keywords: investigate
Depends on:
Blocks:
 
Reported: 2019-12-19 11:14 EST by Jonah Graham CLA
Modified: 2022-10-04 04:25 EDT (History)
2 users (show)

See Also:


Attachments
simple example project (1.99 KB, application/zip)
2019-12-19 11:14 EST, Jonah Graham CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jonah Graham CLA 2019-12-19 11:14:27 EST
Created attachment 281281 [details]
simple example project

This seems improbable - but the diagnostics on @noimplement seem to have broken since Eclipse 4.7 - over warning/erroring on implementations in the same bundle.

According to http://help.eclipse.org/topic/org.eclipse.pde.doc.user/reference/api-tooling/api_javadoc_tags.htm "For example, a bundle that defines an interface as @noimplement is also allowed to provide an implementation of that interface."

But since 4.7 PDE is giving warning or error. (I noticed this because I tried to change CDT's warning to error and got lots of them!)

I have attached a simple project that does not provide the warning on eclipse-SDK-4.6.3, but does on 4.7+
Comment 1 Jonah Graham CLA 2019-12-19 11:22:24 EST
As a sanity check I had a look at JDT classes to see if the warning was there. For example org.eclipse.jdt.core.compiler.CategorizedProblem does have the warning, but as most cases in JDT use @noimplement when the classes that do implement are internal the workspaces are not filled with lots of new warnings. That makes it much more probable that the new warning was missed.
Comment 2 Jonah Graham CLA 2019-12-19 11:28:48 EST
These warnings were introduced by Bug 479384. I am reading through that history now to understand if this bug is invalid.
Comment 3 Jonah Graham CLA 2019-12-19 11:41:43 EST
I have reviewed Bug 479384 and the N&N entry on https://www.eclipse.org/eclipse/news/4.7/pde.php#api-tools-noimplement-noextend-leak

I still don't understand if the warning is valid or not in the attached usecase. If it is, then the documentation[1] needs updating to remove "Restrictions are not applied in the same bundle where API is defined." 

In addition, if the warning is valid, then subclasses of the class should also presumably be warned about. e.g, in addition to the attache project a class like this in the same exported package does not currently warn:

package com.test;

public class MyClass2 extends MyClass {
}


[1] http://help.eclipse.org/topic/org.eclipse.pde.doc.user/reference/api-tooling/api_javadoc_tags.htm
Comment 4 Jonah Graham CLA 2020-10-12 09:40:56 EDT
I had a chance to revisit this and I have manually squashed about 60 warnings in CDT. See Bug 567810 for where I created commented filters for the issue.
Comment 5 Eclipse Genie CLA 2022-10-04 04:25:12 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.