James Moger
2014-04-17 a21f5345df87af6fa54142a1a36404b75217f060
[findbugs] Change scope of variable in HistoryPanel
1 files modified
4 ■■■ changed files
src/main/java/com/gitblit/wicket/panels/HistoryPanel.java 4 ●●● patch | view | raw | blame | history
src/main/java/com/gitblit/wicket/panels/HistoryPanel.java
@@ -78,7 +78,6 @@
        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 @@
            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())) {