Browse Source

[findbugs] Change scope of variable in HistoryPanel

tags/v1.5.0
James Moger 10 years ago
parent
commit
a21f5345df
1 changed files with 1 additions and 3 deletions
  1. 1
    3
      src/main/java/com/gitblit/wicket/panels/HistoryPanel.java

+ 1
- 3
src/main/java/com/gitblit/wicket/panels/HistoryPanel.java View File

@@ -78,7 +78,6 @@ public class HistoryPanel extends BasePanel {
RevCommit commit = JGitUtils.getCommit(r, objectId);
PathModel matchingPath = null;
List<PathChangeModel> paths;
Map<String, SubmoduleModel> submodules = new HashMap<String, SubmoduleModel>();
if (commit == null) {
@@ -86,12 +85,11 @@ public class HistoryPanel extends BasePanel {
String msg = MessageFormat.format("Failed to find history of **{0}** *{1}*",
path, objectId);
log.error(msg + " " + repositoryName);
paths = new ArrayList<PathChangeModel>();
add(new Label("commitHeader", MarkdownUtils.transformMarkdown(msg)).setEscapeModelStrings(false));
add(new Label("breadcrumbs"));
} else {
// commit found
paths = JGitUtils.getFilesInCommit(r, commit);
List<PathChangeModel> paths = JGitUtils.getFilesInCommit(r, commit);
add(new CommitHeaderPanel("commitHeader", repositoryName, commit));
add(new PathBreadcrumbsPanel("breadcrumbs", repositoryName, path, objectId));
for (SubmoduleModel model : JGitUtils.getSubmodules(r, commit.getTree())) {

Loading…
Cancel
Save