mirror of
https://github.com/apache/sqoop.git
synced 2025-05-06 18:22:25 +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 {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private RequestHandler configurableRequestHandler;
|
||||
private static String CONNECTOR_CONFIGURABLE = "connector";
|
||||
private static String DRIVER_CONFIGURABLE = "connector";
|
||||
|
||||
public ConfigurableServlet() {
|
||||
// be default
|
||||
configurableRequestHandler = new DriverRequestHandler();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected JsonBean handleGetRequest(RequestContext ctx) throws Exception {
|
||||
RequestHandler configurableRequestHandler = new DriverRequestHandler();
|
||||
if (ctx.getPath().contains(CONNECTOR_CONFIGURABLE)) {
|
||||
configurableRequestHandler = new ConnectorRequestHandler();
|
||||
} else if (ctx.getPath().contains(DRIVER_CONFIGURABLE)) {
|
||||
configurableRequestHandler = new DriverRequestHandler();
|
||||
}
|
||||
return configurableRequestHandler.handleEvent(ctx);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user