Browse Source

Repository: Make #exactRef and #findRef final

This means less cognitive overhead for both implementors and callers,
since this way we can guarantee that they are always synonyms for
RefDatabase#exactRef and RefDatabase#findRef, respectively.

Change-Id: Ic8aeb52fc7ed65672f3f6cd1da39a66908d88baa
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
stable-5.1
David Pursehouse 7 years ago
parent
commit
e701c59a85
  1. 4
      org.eclipse.jgit/src/org/eclipse/jgit/lib/Repository.java

4
org.eclipse.jgit/src/org/eclipse/jgit/lib/Repository.java

@ -1067,7 +1067,7 @@ public abstract class Repository implements AutoCloseable {
* @since 4.2
*/
@Nullable
public Ref exactRef(String name) throws IOException {
public final Ref exactRef(String name) throws IOException {
return getRefDatabase().exactRef(name);
}
@ -1083,7 +1083,7 @@ public abstract class Repository implements AutoCloseable {
* @since 4.2
*/
@Nullable
public Ref findRef(String name) throws IOException {
public final Ref findRef(String name) throws IOException {
return getRefDatabase().getRef(name);
}

Loading…
Cancel
Save