BlameGenerator: Annotate #getRenameDetector as Nullable

The renameDetector member returned by this method will be null when
following file renames has been disabled by previously calling:

  setFollowFileRenames(false).

Annotate it as @Nullable and update the Javadoc to explicitly
document the null return.

Change-Id: I9bdf443a64cf3c45352d3ab023051a2e11f7426d
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
This commit is contained in:
David Pursehouse 2017-01-31 14:52:52 +09:00 committed by Matthias Sohn
parent 51239129b3
commit 1834421a7f
1 changed files with 6 additions and 3 deletions

View File

@ -51,6 +51,7 @@
import java.util.Collection;
import java.util.Collections;
import org.eclipse.jgit.annotations.Nullable;
import org.eclipse.jgit.blame.Candidate.BlobCandidate;
import org.eclipse.jgit.blame.Candidate.ReverseCandidate;
import org.eclipse.jgit.blame.ReverseWalk.ReverseCommit;
@ -238,11 +239,13 @@ public BlameGenerator setFollowFileRenames(boolean follow) {
}
/**
* Obtain the RenameDetector if {@code setFollowFileRenames(true)}.
* Obtain the RenameDetector, allowing the application to configure its
* settings for rename score and breaking behavior.
*
* @return the rename detector, allowing the application to configure its
* settings for rename score and breaking behavior.
* @return the rename detector, or {@code null} if
* {@code setFollowFileRenames(false)}.
*/
@Nullable
public RenameDetector getRenameDetector() {
return renameDetector;
}