mirror of
https://github.com/apache/sqoop.git
synced 2025-05-07 00:39:46 +08:00
SQOOP-2533: Sqoop2: Findbugs: Fix warning for ConfigurableServlet
(Colin Ma via Jarek Jarcec Cecho)
This commit is contained in:
parent
a7c705938f
commit
e0fbca7faa
@ -37,21 +37,16 @@
|
|||||||
public class ConfigurableServlet extends SqoopProtocolServlet {
|
public class ConfigurableServlet extends SqoopProtocolServlet {
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
private RequestHandler configurableRequestHandler;
|
|
||||||
private static String CONNECTOR_CONFIGURABLE = "connector";
|
private static String CONNECTOR_CONFIGURABLE = "connector";
|
||||||
private static String DRIVER_CONFIGURABLE = "connector";
|
|
||||||
|
|
||||||
public ConfigurableServlet() {
|
public ConfigurableServlet() {
|
||||||
// be default
|
|
||||||
configurableRequestHandler = new DriverRequestHandler();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected JsonBean handleGetRequest(RequestContext ctx) throws Exception {
|
protected JsonBean handleGetRequest(RequestContext ctx) throws Exception {
|
||||||
|
RequestHandler configurableRequestHandler = new DriverRequestHandler();
|
||||||
if (ctx.getPath().contains(CONNECTOR_CONFIGURABLE)) {
|
if (ctx.getPath().contains(CONNECTOR_CONFIGURABLE)) {
|
||||||
configurableRequestHandler = new ConnectorRequestHandler();
|
configurableRequestHandler = new ConnectorRequestHandler();
|
||||||
} else if (ctx.getPath().contains(DRIVER_CONFIGURABLE)) {
|
|
||||||
configurableRequestHandler = new DriverRequestHandler();
|
|
||||||
}
|
}
|
||||||
return configurableRequestHandler.handleEvent(ctx);
|
return configurableRequestHandler.handleEvent(ctx);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user