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

Bug 315120

Summary: ProfileChangeOperation#getProfileChangeRequest returns non-API type
Product: [Eclipse Project] Equinox Reporter: Pascal Rapicault <pascal>
Component: p2Assignee: Pascal Rapicault <pascal>
Status: CLOSED DUPLICATE QA Contact:
Severity: normal    
Priority: P3 CC: dj.houghton, irbull, jeffmcaffer, john.arthorne, kane.mx, kane.zhu, Olivier_Thomann, tjwatson
Version: 3.6   
Target Milestone: 3.7   
Hardware: PC   
OS: Mac OS X - Carbon (unsup.)   
Whiteboard:

Description Pascal Rapicault CLA 2010-05-31 13:24:30 EDT
ProfileChangeOperation returns a ProfileChangeRequest instead of an IProfileChangeRequest.
Comment 1 John Arthorne CLA 2010-05-31 15:51:00 EDT
Thinking more about it, this case is more subtle than other cases where the method parameter is an internal type. In this case a client could have this code:

IProfileChangeRequest req = operation.getProfileChangeRequest();

They are not referencing any internals here, and would not require any change in their source code if the return type was fixed. But, if the method signature changes then the byte code of the referring type will need fixing - i.e., it's a binary incompatible change. This can cause subtle bugs because for example if their source is unchanged then they might not contribute new bits to the build for RC4, and would release broken code without noticing it.

So, if it was up to me I would just fix it in 3.7 where clients have more time to react to the change.
Comment 2 Jeff McAffer CLA 2010-05-31 16:40:31 EDT
waiting is ok with me as well.
Comment 3 Pascal Rapicault CLA 2010-05-31 16:50:36 EDT
Taking that into account, I think it is actually worse in 3.7 because it will force us to have to bump our major version number.
Comment 4 Pascal Rapicault CLA 2010-05-31 16:51:22 EDT
am I correct about version bumping?
Comment 5 John Arthorne CLA 2010-05-31 17:14:58 EDT
The API tools will indicate a major version increment is required for any breaking change like this. In practice, we have a few API "bugs" like this every year that we fix without incrementing the major version number. They are usually just documented in the migration guide, and then an API filter is added to avoid the warning in the build.
Comment 6 Pascal Rapicault CLA 2011-05-07 14:43:24 EDT
This has already been fixed.

*** This bug has been marked as a duplicate of bug 326914 ***