Bug 196857 - Minor cleanup in repository javadoc
Summary: Minor cleanup in repository javadoc
Status: RESOLVED FIXED
Alias: None
Product: Equinox
Classification: Eclipse Project
Component: p2 (show other bugs)
Version: 3.4   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.6 M4   Edit
Assignee: John Arthorne CLA
QA Contact:
URL:
Whiteboard:
Keywords: api
Depends on:
Blocks:
 
Reported: 2007-07-17 14:21 EDT by Susan McCourt CLA
Modified: 2009-11-03 14:10 EST (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Susan McCourt CLA 2007-07-17 14:21:11 EDT
Some of the API methods for manipulating repositories, profiles, etc. do not specify a return value nor do they throw an exception.  

IMetadataRepositoriesManager.getRepository(URL)
IMetadataRepositoriesManager.removeRepository(repo)
IArtifactRepoManager.addRepository(URL)
IArtifactRepoManager.getRepository(URL, int)
IArtifactRepoManager.removeRepository(repo)
IProfileRegistry.addProfile(Profile) throws IllegalArgument if it is a duplicate, but has no exception for failure to add for other conditions
IProfileRegistry.removeProfile(Profile)

etc...etc...

It would probably be best to spec that all of these can throw a ProvisionException??  That would be more in line with the way the resource API always throws a CoreException for any failures encountered, and allows the UI code to know what's going on.   

I'm less sure about where it is necessary/appropriate to define exceptions on the IU methods, since once you have a valid IU I don't know what errors may occur, but IFile should probably be used as a guide for making these decisions.
Comment 1 Susan McCourt CLA 2009-11-03 11:37:48 EST
This bug is quite old.  I reviewed the current API and most of the inconsistencies mentioned above were addressed during 3.4.  The only suggestion remaining is:

IRepositoryManager.addRepository(URI) - should indicate that this just affects the cache and that the validity of the URI or presence of the repo will not be checked until it is loaded (there is similar wording in setRepositoryProperty that could be used)
Comment 2 John Arthorne CLA 2009-11-03 14:10:44 EST
I have added works to that effect in the javadoc.