{"record":{"id":"e925e1ce000d062b","repo":"flowable/flowable-engine","slug":"provided-date-is-null-e925e1","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/ExternalWorkerJobQueryImpl.java","lineNumber":420,"sourceCode":"    }\n\n    @Override\n    public ExternalWorkerJobQuery handlerTypes(Collection<String> handlerTypes) {\n        if (handlerTypes == null) {\n            throw new FlowableIllegalArgumentException(\"Provided handlerTypes are null\");\n        }\n        if (inOrStatement) {\n            this.currentOrQueryObject.handlerTypes = handlerTypes;\n        } else {\n            this.handlerTypes = handlerTypes;\n        }\n        return this;\n    }\n\n    @Override\n    public ExternalWorkerJobQuery 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 ExternalWorkerJobQuery 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":402,"sourceCodeEnd":438,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable-job-service/src/main/java/org/flowable/job/service/impl/ExternalWorkerJobQueryImpl.java#L402-L438","documentation":"ExternalWorkerJobQueryImpl.duedateHigherThan(Date) rejects a null date because a null would yield an invalid comparison predicate on DUEDATE_. Flowable validates query filter arguments eagerly and throws FlowableIllegalArgumentException. The intent is to fail at query-construction time rather than at SQL execution.","triggerScenarios":"Calling duedateHigherThan(null), e.g. a deadline computed from a missing timestamp field or a parsed date that failed to parse and left null.","commonSituations":"Dashboard queries filtering jobs due after a configurable cutoff; date parsing failures silently producing null; timezone/locale parsing bugs.","solutions":["Compute a concrete Date (e.g. new Date()) before building the query","Only call duedateHigherThan(date) when date != null, otherwise skip the filter","Fix the date parsing upstream (use explicit DateTimeFormatter) so null never reaches the query","Return a validation error to the user when the cutoff date input is missing"],"exampleFix":"// before\nDate cutoff = parseSafely(input); // null on bad input\nquery.duedateHigherThan(cutoff);\n// after\nDate cutoff = parseSafely(input);\nif (cutoff != null) {\n    query.duedateHigherThan(cutoff);\n}","handlingStrategy":"validation","validationCode":"Objects.requireNonNull(date, \"duedateHigherThan requires a non-null date\");\nexternalWorkerJobQuery.duedateHigherThan(date);","typeGuard":"boolean isPresent(Date d) { return d != null; }","tryCatchPattern":null,"preventionTips":["Parse dates with explicit formatters and check parse success before querying","Treat optional date filters with if-present branching","Unit-test query builders with missing input data"],"tags":["flowable","null-argument","query-api"],"backgroundTag":"null-argument","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"}