diff options
author | David Pursehouse <david.pursehouse@gmail.com> | 2017-01-31 14:52:52 +0900 |
---|---|---|
committer | Matthias Sohn <matthias.sohn@sap.com> | 2017-02-09 22:40:56 +0100 |
commit | 1834421a7ffd003feb940970b2ade929a41cc965 (patch) | |
tree | ee20fc9264bf7fbf2d6ef4613b1705b4f228b090 /org.eclipse.jgit | |
parent | 51239129b31a3e1288c2eb766d067f51ffd00e29 (diff) | |
download | jgit-1834421a7ffd003feb940970b2ade929a41cc965.tar.gz jgit-1834421a7ffd003feb940970b2ade929a41cc965.zip |
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>
Diffstat (limited to 'org.eclipse.jgit')
-rw-r--r-- | org.eclipse.jgit/src/org/eclipse/jgit/blame/BlameGenerator.java | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/blame/BlameGenerator.java b/org.eclipse.jgit/src/org/eclipse/jgit/blame/BlameGenerator.java index fa6fe75e64..4ad58c3850 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/blame/BlameGenerator.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/blame/BlameGenerator.java @@ -51,6 +51,7 @@ import java.io.IOException; 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 class BlameGenerator implements AutoCloseable { } /** - * 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; } |