{"record":{"id":"a1c0b5b1e4114593","repo":"flowable/flowable-engine","slug":"event-cannot-be-null","errorCode":null,"errorMessage":"Event cannot be null.","messagePattern":"Event cannot be null\\.","errorType":"exception","errorClass":"FlowableIllegalArgumentException","httpStatus":null,"severity":"error","filePath":"modules/flowable-engine-common/src/main/java/org/flowable/common/engine/impl/event/FlowableEventSupport.java","lineNumber":89,"sourceCode":"\n        } else {\n            for (FlowableEventType type : types) {\n                addTypedEventListener(listenerToAdd, type);\n            }\n        }\n    }\n\n    public void removeEventListener(FlowableEventListener listenerToRemove) {\n        eventListeners.remove(listenerToRemove);\n\n        for (List<FlowableEventListener> listeners : typedListeners.values()) {\n            listeners.remove(listenerToRemove);\n        }\n    }\n\n    public void dispatchEvent(FlowableEvent event) {\n        if (event == null) {\n            throw new FlowableIllegalArgumentException(\"Event cannot be null.\");\n        }\n\n        if (event.getType() == null) {\n            throw new FlowableIllegalArgumentException(\"Event type cannot be null.\");\n        }\n\n        // Call global listeners\n        if (!eventListeners.isEmpty()) {\n            for (FlowableEventListener listener : eventListeners) {\n                dispatchEvent(event, listener);\n            }\n        }\n\n        // Call typed listeners, if any\n        List<FlowableEventListener> typed = typedListeners.get(event.getType());\n        if (typed != null && !typed.isEmpty()) {\n            for (FlowableEventListener listener : typed) {\n                dispatchEvent(event, listener);","sourceCodeStart":71,"sourceCodeEnd":107,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable-engine-common/src/main/java/org/flowable/common/engine/impl/event/FlowableEventSupport.java#L71-L107","documentation":"Argument guard in FlowableEventSupport.dispatchEvent: an event with no payload (null FlowableEvent) was submitted to the dispatcher. Dispatching nothing is a programming error, so it is rejected before listener iteration.","triggerScenarios":"Thrown at modules/flowable-engine-common/src/main/java/org/flowable/common/engine/impl/event/FlowableEventSupport.java:89 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Dispatch only constructed, non-null FlowableEvent instances","Guard event-producing code paths that may pass null in edge cases"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"d6d39ce1c69ff244f2d9dc6af756a9b95e865586","analyzedAt":"2026-09-11T06:41:19.413Z","contentChangedAt":"2026-09-11T06:41:19.413Z","schemaVersion":2},"datasetVersion":"2026-09-18T11:17:12.947Z"}