{"record":{"id":"352ab9128bca865e","repo":"flowable/flowable-engine","slug":"provided-date-is-null-352ab9","errorCode":null,"errorMessage":"Provided date is null","messagePattern":"Provided date is null","errorType":"exception","errorClass":"FlowableIllegalArgumentException","httpStatus":null,"severity":"error","filePath":"modules/flowable-job-service/src/main/java/org/flowable/job/service/impl/DeadLetterJobQueryImpl.java","lineNumber":483,"sourceCode":"        }\n\n        if (onlyTimers) {\n            throw new FlowableIllegalArgumentException(\"Cannot combine onlyTimers() with onlyExternalWorkers() in the same query\");\n        }\n\n        if (inOrStatement) {\n            this.currentOrQueryObject.onlyExternalWorkers = true;\n        } else {\n            this.onlyExternalWorkers = true;\n        }\n        return this;\n    }\n\n\n    @Override\n    public DeadLetterJobQueryImpl duedateHigherThan(Date date) {\n        if (date == null) {\n            throw new FlowableIllegalArgumentException(\"Provided date is null\");\n        }\n        if (inOrStatement) {\n            this.currentOrQueryObject.duedateHigherThan = date;\n        } else {\n            this.duedateHigherThan = date;\n        }\n        return this;\n    }\n\n    @Override\n    public DeadLetterJobQueryImpl duedateLowerThan(Date date) {\n        if (date == null) {\n            throw new FlowableIllegalArgumentException(\"Provided date is null\");\n        }\n        if (inOrStatement) {\n            this.currentOrQueryObject.duedateLowerThan = date;\n        } else {\n            this.duedateLowerThan = date;","sourceCodeStart":465,"sourceCodeEnd":501,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable-job-service/src/main/java/org/flowable/job/service/impl/DeadLetterJobQueryImpl.java#L465-L501","documentation":"DeadLetterJobQueryImpl.duedateHigherThan(Date) requires a non-null date because the value is used directly as a comparison bound in the query. Passing null cannot be interpreted as a meaningful filter, so FlowableIllegalArgumentException is thrown immediately. Null filtering semantics must be expressed by simply not calling the method.","triggerScenarios":"Calling deadLetterJobQuery().duedateHigherThan(someDate) where someDate is null (often a variable from config, parsing, or an API payload that was null).","commonSituations":"A nullable deadline/timestamp parsed from JSON or a database column ends up null; configuration property not set and passed straight into the query.","solutions":["Ensure the date is non-null before calling duedateHigherThan, or skip the filter when null","Default the date to a meaningful bound (e.g. new Date(0)) if a bound is always required","Validate/parse the source value earlier and fail with a clearer message"],"exampleFix":"// before\nquery.duedateHigherThan(config.getDueAfter()); // NPE risk / throws if null\n// after\nif (config.getDueAfter() != null) {\n    query.duedateHigherThan(config.getDueAfter());\n}","handlingStrategy":"validation","validationCode":"if (dueAfter != null) { query.duedateHigherThan(dueAfter); }","typeGuard":"boolean hasDueAfter(Date d) { return d != null; }","tryCatchPattern":"try { query.duedateHigherThan(dueAfter); } catch (FlowableIllegalArgumentException e) { log.warn(\"Null due date ignored\", e); }","preventionTips":["Null-check dates from config/JSON before filtering","Skip optional filters instead of passing null","Default to a sentinel epoch date if a bound is mandatory"],"tags":["flowable","job-query","null-argument","date-filter"],"backgroundTag":"null-argument","analyzedSha":"d6d39ce1c69ff244f2d9dc6af756a9b95e865586","analyzedAt":"2026-09-11T06:41:19.413Z","contentChangedAt":"2026-09-11T06:41:19.413Z","schemaVersion":2},"datasetVersion":"2026-09-14T11:17:12.474Z"}