From: James Moger Date: Fri, 18 Apr 2014 02:15:21 +0000 (-0400) Subject: [findbugs] Fix user assignment for clone permission check in repository resolver X-Git-Tag: v1.5.0~23 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=7c95e9cf122b933823d7743c9b7e91f065bd59be;p=gitblit.git [findbugs] Fix user assignment for clone permission check in repository resolver --- diff --git a/src/main/java/com/gitblit/git/RepositoryResolver.java b/src/main/java/com/gitblit/git/RepositoryResolver.java index cc13144e..10336373 100644 --- a/src/main/java/com/gitblit/git/RepositoryResolver.java +++ b/src/main/java/com/gitblit/git/RepositoryResolver.java @@ -83,8 +83,8 @@ public class RepositoryResolver extends FileResolver { protected boolean isExportOk(X req, String repositoryName, Repository db) throws IOException { RepositoryModel model = gitblit.getRepositoryModel(repositoryName); + UserModel user = UserModel.ANONYMOUS; String scheme = null; - UserModel user = null; String origin = null; if (req instanceof GitDaemonClient) { @@ -93,7 +93,6 @@ public class RepositoryResolver extends FileResolver { GitDaemonClient client = (GitDaemonClient) req; scheme = "git"; origin = client.getRemoteAddress().toString(); - user = UserModel.ANONYMOUS; } else if (req instanceof HttpServletRequest) { // http/https request HttpServletRequest client = (HttpServletRequest) req;