This is simpler to implement than getRef. Make it abstract so implementers remember to override it. Change-Id: I5f319be1fb1206d7a0142ea939dc4e1039f850ab Signed-off-by: Jonathan Nieder <jrn@google.com>tags/v5.3.0.201901161700-m1
@@ -94,6 +94,11 @@ public class RefDatabaseConflictingNamesTest { | |||
return false; | |||
} | |||
@Override | |||
public Ref exactRef(String name) throws IOException { | |||
return null; | |||
} | |||
@Override | |||
public Ref getRef(String name) throws IOException { | |||
return null; |
@@ -38,6 +38,14 @@ | |||
</message_arguments> | |||
</filter> | |||
</resource> | |||
<resource path="src/org/eclipse/jgit/lib/RefDatabase.java" type="org.eclipse.jgit.lib.RefDatabase"> | |||
<filter comment="class is extended by extenders but not clients of the API" id="421650549"> | |||
<message_arguments> | |||
<message_argument value="org.eclipse.jgit.lib.RefDatabase"/> | |||
<message_argument value="exactRef(String)"/> | |||
</message_arguments> | |||
</filter> | |||
</resource> | |||
<resource path="src/org/eclipse/jgit/revwalk/DepthWalk.java" type="org.eclipse.jgit.revwalk.DepthWalk"> | |||
<filter id="403804204"> | |||
<message_arguments> |
@@ -290,13 +290,7 @@ public abstract class RefDatabase { | |||
* @since 4.1 | |||
*/ | |||
@Nullable | |||
public Ref exactRef(String name) throws IOException { | |||
Ref ref = getRef(name); | |||
if (ref == null || !name.equals(ref.getName())) { | |||
return null; | |||
} | |||
return ref; | |||
} | |||
public abstract Ref exactRef(String name) throws IOException; | |||
/** | |||
* Read the specified references. |