mirror of
https://github.com/apache/sqoop.git
synced 2025-05-09 05:01:06 +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);
|
return createUpdateJob(ctx, true);
|
||||||
case PUT:
|
case PUT:
|
||||||
JobAction action = JobAction.fromString(ctx.getLastURLElement());
|
JobAction action = JobAction.fromString(ctx.getLastURLElement());
|
||||||
switch (action) {
|
if (action != null) {
|
||||||
case ENABLE:
|
switch (action) {
|
||||||
return enableJob(ctx, true);
|
case ENABLE:
|
||||||
case DISABLE:
|
return enableJob(ctx, true);
|
||||||
return enableJob(ctx, false);
|
case DISABLE:
|
||||||
case START:
|
return enableJob(ctx, false);
|
||||||
return startJob(ctx);
|
case START:
|
||||||
case STOP:
|
return startJob(ctx);
|
||||||
return stopJob(ctx);
|
case STOP:
|
||||||
default:
|
return stopJob(ctx);
|
||||||
return createUpdateJob(ctx, false);
|
}
|
||||||
}
|
}
|
||||||
|
return createUpdateJob(ctx, false);
|
||||||
case DELETE:
|
case DELETE:
|
||||||
return deleteJob(ctx);
|
return deleteJob(ctx);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user