Bug 226958 - [api] Inconsistent RSECorePlugin.waitForInitCompletion() return value
Summary: [api] Inconsistent RSECorePlugin.waitForInitCompletion() return value
Status: RESOLVED FIXED
Alias: None
Product: Target Management
Classification: Tools
Component: RSE (show other bugs)
Version: 3.0   Edit
Hardware: All All
: P2 enhancement (vote)
Target Milestone: 3.0 RC1   Edit
Assignee: David Dykstal CLA
QA Contact: Martin Oberhuber CLA
URL:
Whiteboard:
Keywords: api
Depends on:
Blocks:
 
Reported: 2008-04-14 11:55 EDT by Martin Oberhuber CLA
Modified: 2008-05-15 18:51 EDT (History)
0 users

See Also:
mober.at+eclipse: pmc_approved+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Oberhuber CLA 2008-04-14 11:55:37 EDT
In class RSECorePlugin, there are two overloaded methods of

class RSECorePlugin {
  static void waitForInitCompletion(int phase);
  static IStatus waitForInitCompletion();
}

These seem unnecessarily inconsistent. Every waitForInitCompletion() call should return a status value, even if just one phase is being watched.

Note that changing the return value is not binary compatible, but it is source compatible. Therefore, I don't think changing the return value is a problem in M7 - the API was newly added in this release cycle, so there is no reason for backward compatibility. And clients, who started adopting this API already will remain source compatible.
Comment 1 David Dykstal CLA 2008-05-15 18:04:16 EDT
Martin --

I have a fix (and modified tests) for this. Do you think we need to vote on it since it is new in this release?

-- Dave
Comment 2 Martin Oberhuber CLA 2008-05-15 18:10:38 EDT
Voting is never bad, but we can do it after the fact (i.e. you can be optimistic and commit it, and promise to back it out again in case anybody would vote -1).

You have my +1 for making the change as the project lead and pmc member.

What's especially helping here is that the change should be Source Compatible, since client code that expected a "void" return value will continue to compile if an IStatus is returned. 

For new code added within this release cycle, we are more concerned about source compatibility (which impacts adopters) than binary compatibility (since there are no binaries out in the wild yet).
Comment 3 David Dykstal CLA 2008-05-15 18:45:49 EDT
Right. The change is source compatible. I will go ahead and commit and advertise for negative votes on the mailing list.
Comment 4 David Dykstal CLA 2008-05-15 18:51:26 EDT
API changes:

RSECorePlugin.waitForInitCompletion(int) now returns an IStatus instead of "void"
RSEInitJob.waitForInitCompletion(int) now returns an IStatus instead of "void"

As discussed above, these changes are source compatible. Binary compatibility is not an issue with previous releases since this is new function.