mirror of
https://github.com/apache/sqoop.git
synced 2025-05-08 21:12:12 +08:00
SQOOP-1668: Update existing job meets NPE
(Qian Xu via Jarek Jarcec Cecho)
This commit is contained in:
parent
93d6f2f888
commit
63ebb11d3a
@ -102,18 +102,19 @@ public JsonBean handleEvent(RequestContext ctx) {
|
||||
return createUpdateJob(ctx, true);
|
||||
case PUT:
|
||||
JobAction action = JobAction.fromString(ctx.getLastURLElement());
|
||||
switch (action) {
|
||||
case ENABLE:
|
||||
return enableJob(ctx, true);
|
||||
case DISABLE:
|
||||
return enableJob(ctx, false);
|
||||
case START:
|
||||
return startJob(ctx);
|
||||
case STOP:
|
||||
return stopJob(ctx);
|
||||
default:
|
||||
return createUpdateJob(ctx, false);
|
||||
if (action != null) {
|
||||
switch (action) {
|
||||
case ENABLE:
|
||||
return enableJob(ctx, true);
|
||||
case DISABLE:
|
||||
return enableJob(ctx, false);
|
||||
case START:
|
||||
return startJob(ctx);
|
||||
case STOP:
|
||||
return stopJob(ctx);
|
||||
}
|
||||
}
|
||||
return createUpdateJob(ctx, false);
|
||||
case DELETE:
|
||||
return deleteJob(ctx);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user