mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-02 11:35:57 +01:00
servlet fields should be final
This commit is contained in:
@@ -307,5 +307,5 @@ public class ProxyServlet extends HttpServlet
|
||||
//~--- fields ---------------------------------------------------------------
|
||||
|
||||
/** Field description */
|
||||
private ProxyConfigurationProvider configurationProvider;
|
||||
private final ProxyConfigurationProvider configurationProvider;
|
||||
}
|
||||
|
||||
@@ -54,6 +54,7 @@ import java.io.IOException;
|
||||
import javax.servlet.ServletException;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import sonia.scm.repository.RepositoryException;
|
||||
|
||||
/**
|
||||
*
|
||||
@@ -170,7 +171,11 @@ public class ScmGitServlet extends GitServlet
|
||||
{
|
||||
repositoryViewer.handleRequest(request, response, scmRepository);
|
||||
}
|
||||
catch (Exception ex)
|
||||
catch (RepositoryException ex)
|
||||
{
|
||||
throw new ServletException("could not create repository view", ex);
|
||||
}
|
||||
catch (IOException ex)
|
||||
{
|
||||
throw new ServletException("could not create repository view", ex);
|
||||
}
|
||||
@@ -184,11 +189,11 @@ public class ScmGitServlet extends GitServlet
|
||||
//~--- fields ---------------------------------------------------------------
|
||||
|
||||
/** Field description */
|
||||
private RepositoryProvider repositoryProvider;
|
||||
private final RepositoryProvider repositoryProvider;
|
||||
|
||||
/** Field description */
|
||||
private RepositoryRequestListenerUtil repositoryRequestListenerUtil;
|
||||
private final RepositoryRequestListenerUtil repositoryRequestListenerUtil;
|
||||
|
||||
/** Field description */
|
||||
private GitRepositoryViewer repositoryViewer;
|
||||
private final GitRepositoryViewer repositoryViewer;
|
||||
}
|
||||
|
||||
@@ -122,6 +122,7 @@ public class HgCGIServlet extends HttpServlet
|
||||
this.hookManager = hookManager;
|
||||
this.requestListenerUtil = requestListenerUtil;
|
||||
this.exceptionHandler = new HgCGIExceptionHandler();
|
||||
this.command = HgPythonScript.HGWEB.getFile(SCMContext.getContext());
|
||||
}
|
||||
|
||||
//~--- methods --------------------------------------------------------------
|
||||
@@ -135,7 +136,7 @@ public class HgCGIServlet extends HttpServlet
|
||||
@Override
|
||||
public void init() throws ServletException
|
||||
{
|
||||
command = HgPythonScript.HGWEB.getFile(SCMContext.getContext());
|
||||
|
||||
super.init();
|
||||
}
|
||||
|
||||
@@ -176,7 +177,11 @@ public class HgCGIServlet extends HttpServlet
|
||||
{
|
||||
handleRequest(request, response, repository);
|
||||
}
|
||||
catch (Exception ex)
|
||||
catch (ServletException ex)
|
||||
{
|
||||
exceptionHandler.handleException(request, response, ex);
|
||||
}
|
||||
catch (IOException ex)
|
||||
{
|
||||
exceptionHandler.handleException(request, response, ex);
|
||||
}
|
||||
@@ -258,6 +263,7 @@ public class HgCGIServlet extends HttpServlet
|
||||
executor.getEnvironment().set(ENV_REPOSITORY_NAME, name);
|
||||
executor.getEnvironment().set(ENV_REPOSITORY_PATH,
|
||||
directory.getAbsolutePath());
|
||||
|
||||
// add hook environment
|
||||
//J-
|
||||
HgEnvironment.prepareEnvironment(
|
||||
@@ -312,26 +318,26 @@ public class HgCGIServlet extends HttpServlet
|
||||
//~--- fields ---------------------------------------------------------------
|
||||
|
||||
/** Field description */
|
||||
private CGIExecutorFactory cgiExecutorFactory;
|
||||
private final CGIExecutorFactory cgiExecutorFactory;
|
||||
|
||||
/** Field description */
|
||||
private File command;
|
||||
private final File command;
|
||||
|
||||
/** Field description */
|
||||
private ScmConfiguration configuration;
|
||||
private final ScmConfiguration configuration;
|
||||
|
||||
/** Field description */
|
||||
private HgCGIExceptionHandler exceptionHandler;
|
||||
private final HgCGIExceptionHandler exceptionHandler;
|
||||
|
||||
/** Field description */
|
||||
private HgRepositoryHandler handler;
|
||||
private final HgRepositoryHandler handler;
|
||||
|
||||
/** Field description */
|
||||
private HgHookManager hookManager;
|
||||
private final HgHookManager hookManager;
|
||||
|
||||
/** Field description */
|
||||
private RepositoryProvider repositoryProvider;
|
||||
private final RepositoryProvider repositoryProvider;
|
||||
|
||||
/** Field description */
|
||||
private RepositoryRequestListenerUtil requestListenerUtil;
|
||||
private final RepositoryRequestListenerUtil requestListenerUtil;
|
||||
}
|
||||
|
||||
@@ -538,14 +538,14 @@ public class HgHookCallbackServlet extends HttpServlet
|
||||
//~--- fields ---------------------------------------------------------------
|
||||
|
||||
/** Field description */
|
||||
private Provider<HgContext> contextProvider;
|
||||
private final Provider<HgContext> contextProvider;
|
||||
|
||||
/** Field description */
|
||||
private HgRepositoryHandler handler;
|
||||
private final HgRepositoryHandler handler;
|
||||
|
||||
/** Field description */
|
||||
private HookEventFacade hookEventFacade;
|
||||
private final HookEventFacade hookEventFacade;
|
||||
|
||||
/** Field description */
|
||||
private HgHookManager hookManager;
|
||||
private final HgHookManager hookManager;
|
||||
}
|
||||
|
||||
@@ -284,21 +284,21 @@ public class SvnDAVServlet extends DAVServlet
|
||||
//~--- fields -------------------------------------------------------------
|
||||
|
||||
/** Field description */
|
||||
private RepositoryProvider repositoryProvider;
|
||||
private final RepositoryProvider repositoryProvider;
|
||||
}
|
||||
|
||||
|
||||
//~--- fields ---------------------------------------------------------------
|
||||
|
||||
/** Field description */
|
||||
private SvnCollectionRenderer collectionRenderer;
|
||||
private final SvnCollectionRenderer collectionRenderer;
|
||||
|
||||
/** Field description */
|
||||
private SvnRepositoryHandler handler;
|
||||
private final SvnRepositoryHandler handler;
|
||||
|
||||
/** Field description */
|
||||
private RepositoryProvider repositoryProvider;
|
||||
private final RepositoryProvider repositoryProvider;
|
||||
|
||||
/** Field description */
|
||||
private RepositoryRequestListenerUtil repositoryRequestListenerUtil;
|
||||
private final RepositoryRequestListenerUtil repositoryRequestListenerUtil;
|
||||
}
|
||||
|
||||
@@ -167,5 +167,5 @@ public abstract class AbstractResourceServlet extends HttpServlet
|
||||
//~--- fields ---------------------------------------------------------------
|
||||
|
||||
/** Field description */
|
||||
private ResourceManager resourceManager;
|
||||
private final ResourceManager resourceManager;
|
||||
}
|
||||
|
||||
@@ -185,8 +185,8 @@ public class ErrorServlet extends HttpServlet
|
||||
//~--- fields ---------------------------------------------------------------
|
||||
|
||||
/** Field description */
|
||||
private SCMContextProvider context;
|
||||
private final SCMContextProvider context;
|
||||
|
||||
/** Field description */
|
||||
private TemplateEngineFactory templateEngineFactory;
|
||||
private final TemplateEngineFactory templateEngineFactory;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user