Handler for CancelScheduledJob is added regardless of if Jobs are used #2944
Labels
bug
Confirmed or suspected bug
good first issue
Small, lower complexity and doesn't require pre-existing Gaffer knowledge
Milestone
Describe the bug
In Store, the
CancelScheduledJob
operation handler is always added. Whereas all other Job related operation handlers are only added if Jobs are enabled. Unless there's a reason for this, theCancelScheduledJob
operation handler should be treated the same as other Job related operation handlers and only be added if Jobs are enabled.Details
Store.java
: Other Job operations are added only if Jobs are enabled.Store.java
: TheCancelScheduledJob
handler is always added.CancelScheduledJobHandler.java
: The handler fails if used when Jobs are not enabled.Expected behavior
Handlers not added inconsistently and not added if they cannot be used.
Assumed Fix
In
Store.java
, move theaddOperationHandler
call forCancelScheduledJob
into the section which runs only when jobs are enabled.The text was updated successfully, but these errors were encountered: