Bug 247632 - Invalid "constructor has been removed" warning on internal class
Summary: Invalid "constructor has been removed" warning on internal class
Status: VERIFIED FIXED
Alias: None
Product: PDE
Classification: Eclipse Project
Component: API Tools (show other bugs)
Version: 3.5   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.5 M2   Edit
Assignee: Olivier Thomann CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 247655 (view as bug list)
Depends on:
Blocks: 245858
  Show dependency tree
 
Reported: 2008-09-17 07:31 EDT by Jerome Lanneluc CLA
Modified: 2008-09-17 13:00 EDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jerome Lanneluc CLA 2008-09-17 07:31:38 EDT
I20080917-0100

Attempting to apply the patch from 245858 comment 1, I get the following warning:
Description	Resource	Path	Location	Type
The constructor org.eclipse.jdt.internal.codeassist.InternalCompletionProposal.InternalCompletionProposal() has been removed	InternalCompletionProposal.java	org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist	line 32	Compatibility Problem

Since this class is internal, it should not warn in such case.
Comment 1 Darin Wright CLA 2008-09-17 09:26:52 EDT
Jerome, does a clean/full build of the project make the error go away?
Comment 2 Michael Rennie CLA 2008-09-17 10:14:47 EDT
I reproduced the problem using I20080914-2000 and a clean / build did not remove the problems.
Comment 3 Olivier Thomann CLA 2008-09-17 10:16:52 EDT
I am investigating a fix for this one.
Comment 4 Jerome Lanneluc CLA 2008-09-17 10:46:07 EDT
(In reply to comment #1)
> Jerome, does a clean/full build of the project make the error go away?
> 
I confirm that clean/full build didn't make the error go away.
Comment 5 Darin Wright CLA 2008-09-17 11:07:46 EDT
Should address for M2.
Comment 6 Olivier Thomann CLA 2008-09-17 11:18:57 EDT
yes, this is something we should fix for M2. I am preparing a patch for it.
The problem comes from the checking of the superclass of an API type. Even if the superclass is an internal type, we still check it as any visible methods/fields/member types would also be API. We should however filter out constructor changes and they are not directly called from the API type.
In this case the CompletionProposal in the new version of the class has no longer an internal type as the superclass. We should not check the superclass if it has been changed.
Comment 7 Olivier Thomann CLA 2008-09-17 11:38:09 EDT
*** Bug 247655 has been marked as a duplicate of this bug. ***
Comment 8 Olivier Thomann CLA 2008-09-17 11:41:55 EDT
Added regression tests in:
org.eclipse.pde.api.tools.comparator.tests.MethodDeltaTests#test112
org.eclipse.pde.api.tools.comparator.tests.MethodDeltaTests#test113
org.eclipse.pde.api.tools.comparator.tests.MethodDeltaTests#test114
org.eclipse.pde.api.tools.comparator.tests.MethodDeltaTests#test115

Released for 3.5M2.
Darin, please verify.
Comment 9 Darin Wright CLA 2008-09-17 13:00:39 EDT
Verified. Added builder regression tests:

ClassCompatibilityInternalTests.testRemoveInternalConstructor*()