Repository: Deprecate the #getAllRefs method
Callers should instead use getRefDatabase().getRefs(), which does not swallow the IOException. Replace @link with @code in the Javadoc of FileRepository, since linking to the deprecated method causes an error: Javadoc: The method getAllRefs() from the type Repository is deprecated Existing callers of the deprecated method are not adapted in this commit because many of them require more refactoring. They will be done in separate follow-up commits. Bug: 534731 Change-Id: Id84e70e4cd7be3d1ca1795512950c6abe3d18ffd Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
This commit is contained in:
parent
51599ebb84
commit
4162ad0dd3
|
@ -477,7 +477,7 @@ private File descriptionFile() {
|
|||
/**
|
||||
* {@inheritDoc}
|
||||
* <p>
|
||||
* Objects known to exist but not expressed by {@link #getAllRefs()}.
|
||||
* Objects known to exist but not expressed by {@code #getAllRefs()}.
|
||||
* <p>
|
||||
* When a repository borrows objects from another repository, it can
|
||||
* advertise that it safely has that other repository's references, without
|
||||
|
@ -490,12 +490,12 @@ public Set<ObjectId> getAdditionalHaves() {
|
|||
}
|
||||
|
||||
/**
|
||||
* Objects known to exist but not expressed by {@link #getAllRefs()}.
|
||||
* Objects known to exist but not expressed by {@code #getAllRefs()}.
|
||||
* <p>
|
||||
* When a repository borrows objects from another repository, it can
|
||||
* advertise that it safely has that other repository's references, without
|
||||
* exposing any other details about the other repository. This may help
|
||||
* a client trying to push changes avoid pushing more than it needs to.
|
||||
* exposing any other details about the other repository. This may help a
|
||||
* client trying to push changes avoid pushing more than it needs to.
|
||||
*
|
||||
* @param skips
|
||||
* Set of AlternateHandle Ids already seen
|
||||
|
|
|
@ -1092,7 +1092,9 @@ public final Ref findRef(String name) throws IOException {
|
|||
* not point to any object yet.
|
||||
*
|
||||
* @return mutable map of all known refs (heads, tags, remotes).
|
||||
* @deprecated use {@code getRefDatabase().getRefs()} instead.
|
||||
*/
|
||||
@Deprecated
|
||||
@NonNull
|
||||
public Map<String, Ref> getAllRefs() {
|
||||
try {
|
||||
|
|
Loading…
Reference in New Issue