From a21f5345df87af6fa54142a1a36404b75217f060 Mon Sep 17 00:00:00 2001 From: James Moger Date: Thu, 17 Apr 2014 22:52:52 -0400 Subject: [PATCH] [findbugs] Change scope of variable in HistoryPanel --- src/main/java/com/gitblit/wicket/panels/HistoryPanel.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/main/java/com/gitblit/wicket/panels/HistoryPanel.java b/src/main/java/com/gitblit/wicket/panels/HistoryPanel.java index b5ed38a1..21f38388 100644 --- a/src/main/java/com/gitblit/wicket/panels/HistoryPanel.java +++ b/src/main/java/com/gitblit/wicket/panels/HistoryPanel.java @@ -78,7 +78,6 @@ public class HistoryPanel extends BasePanel { RevCommit commit = JGitUtils.getCommit(r, objectId); PathModel matchingPath = null; - List paths; Map submodules = new HashMap(); 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(); add(new Label("commitHeader", MarkdownUtils.transformMarkdown(msg)).setEscapeModelStrings(false)); add(new Label("breadcrumbs")); } else { // commit found - paths = JGitUtils.getFilesInCommit(r, commit); + List 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())) { -- 2.39.5