瀏覽代碼

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>
tags/v4.7.0.201704051617-r
David Pursehouse 7 年之前
父節點
當前提交
1834421a7f
共有 1 個檔案被更改,包括 6 行新增3 行删除
  1. 6
    3
      org.eclipse.jgit/src/org/eclipse/jgit/blame/BlameGenerator.java

+ 6
- 3
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;
}

Loading…
取消
儲存