LfsPluginServlet#load: Fix local variable hiding
The local variable `filter` was hiding the member variable of the same name. Change-Id: I3271f353de3e78ff0fdafc19e62946884b461520
This commit is contained in:
@@ -124,9 +124,9 @@ public class LfsPluginServlet extends HttpServlet
|
|||||||
private GuiceFilter load(Plugin plugin) {
|
private GuiceFilter load(Plugin plugin) {
|
||||||
if (plugin.getHttpInjector() != null) {
|
if (plugin.getHttpInjector() != null) {
|
||||||
final String name = plugin.getName();
|
final String name = plugin.getName();
|
||||||
final GuiceFilter filter;
|
final GuiceFilter guiceFilter;
|
||||||
try {
|
try {
|
||||||
filter = plugin.getHttpInjector().getInstance(GuiceFilter.class);
|
guiceFilter = plugin.getHttpInjector().getInstance(GuiceFilter.class);
|
||||||
} catch (RuntimeException e) {
|
} catch (RuntimeException e) {
|
||||||
log.warn(String.format("Plugin %s cannot load GuiceFilter", name), e);
|
log.warn(String.format("Plugin %s cannot load GuiceFilter", name), e);
|
||||||
return null;
|
return null;
|
||||||
@@ -135,7 +135,7 @@ public class LfsPluginServlet extends HttpServlet
|
|||||||
try {
|
try {
|
||||||
ServletContext ctx =
|
ServletContext ctx =
|
||||||
PluginServletContext.create(plugin, "/");
|
PluginServletContext.create(plugin, "/");
|
||||||
filter.init(new WrappedFilterConfig(ctx));
|
guiceFilter.init(new WrappedFilterConfig(ctx));
|
||||||
} catch (ServletException e) {
|
} catch (ServletException e) {
|
||||||
log.warn(String.format("Plugin %s failed to initialize HTTP", name), e);
|
log.warn(String.format("Plugin %s failed to initialize HTTP", name), e);
|
||||||
return null;
|
return null;
|
||||||
@@ -144,10 +144,10 @@ public class LfsPluginServlet extends HttpServlet
|
|||||||
plugin.add(new RegistrationHandle() {
|
plugin.add(new RegistrationHandle() {
|
||||||
@Override
|
@Override
|
||||||
public void remove() {
|
public void remove() {
|
||||||
filter.destroy();
|
guiceFilter.destroy();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
return filter;
|
return guiceFilter;
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user