5
0
mirror of https://github.com/apache/sqoop.git synced 2025-05-09 00:29:40 +08:00

SQOOP-1668: Update existing job meets NPE

(Qian Xu via Jarek Jarcec Cecho)
This commit is contained in:
Jarek Jarcec Cecho 2014-11-04 10:01:12 -08:00
parent 93d6f2f888
commit 63ebb11d3a

View File

@ -102,6 +102,7 @@ public JsonBean handleEvent(RequestContext ctx) {
return createUpdateJob(ctx, true);
case PUT:
JobAction action = JobAction.fromString(ctx.getLastURLElement());
if (action != null) {
switch (action) {
case ENABLE:
return enableJob(ctx, true);
@ -111,9 +112,9 @@ public JsonBean handleEvent(RequestContext ctx) {
return startJob(ctx);
case STOP:
return stopJob(ctx);
default:
return createUpdateJob(ctx, false);
}
}
return createUpdateJob(ctx, false);
case DELETE:
return deleteJob(ctx);
}