{"record":{"id":"76ac25b38a08f8f3","repo":"flowable/flowable-engine","slug":"using-joda-time-localdate-has-been-deprecated-and-76ac25","errorCode":null,"errorMessage":"Using Joda-Time LocalDate has been deprecated and will be removed in a future version. Variable {} in {} instance {} and sub-scope {} was a Joda-Time LocalDate. ","messagePattern":"Using Joda-Time LocalDate has been deprecated and will be removed in a future version\\. Variable (.+?) in (.+?) instance (.+?) and sub-scope (.+?) was a Joda-Time LocalDate\\. ","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"modules/flowable-variable-service/src/main/java/org/flowable/variable/service/impl/types/JodaDateType.java","lineNumber":66,"sourceCode":"        if (longValue != null) {\n            return new LocalDate(longValue);\n        }\n        return null;\n    }\n\n    @Override\n    public void setValue(Object value, ValueFields valueFields) {\n        if (value != null) {\n            if (valueFields.getTaskId() != null) {\n                JodaDeprecationLogger.LOGGER.warn(\n                        \"Using Joda-Time LocalDate has been deprecated and will be removed in a future version. Task Variable {} in task {} was a Joda-Time LocalDate. \",\n                        valueFields.getName(), valueFields.getTaskId());\n            } else if (valueFields.getProcessInstanceId() != null) {\n                JodaDeprecationLogger.LOGGER.warn(\n                        \"Using Joda-Time LocalDate has been deprecated and will be removed in a future version. Process Variable {} in process instance {} and execution {} was a Joda-Time LocalDate. \",\n                        valueFields.getName(), valueFields.getProcessInstanceId(), valueFields.getExecutionId());\n            } else {\n                JodaDeprecationLogger.LOGGER.warn(\n                        \"Using Joda-Time LocalDate has been deprecated and will be removed in a future version. Variable {} in {} instance {} and sub-scope {} was a Joda-Time LocalDate. \",\n                        valueFields.getName(), valueFields.getScopeType(), valueFields.getScopeId(), valueFields.getSubScopeId());\n            }\n            valueFields.setLongValue(((LocalDate) value).toDateTimeAtStartOfDay().getMillis());\n        } else {\n            valueFields.setLongValue(null);\n        }\n    }\n}\n","sourceCodeStart":48,"sourceCodeEnd":76,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable-variable-service/src/main/java/org/flowable/variable/service/impl/types/JodaDateType.java#L48-L76","documentation":"A deprecation warning logged by JodaDateType.setValue when a variable in a non-task, non-process scope (e.g. case or other scope types) holds a Joda-Time LocalDate. Scope type, id and sub-scope id are logged; the value is stored as start-of-day millis.","triggerScenarios":"Setting a variable to org.joda.time.LocalDate when ValueFields has neither taskId nor processInstanceId, only scopeType/scopeId/subScopeId (e.g. scoped variable storage).","commonSituations":"Applications using sub-scope variable storage with legacy Joda date values; upgraded Activiti 5 code.","solutions":["Switch the value type to java.time.LocalDate","Refactor value-producing code to the java.time API","Track and remove remaining Joda-Time variable usage before upgrading Flowable"],"exampleFix":"// before\nruntimeService.setVariable(scopeId, \"window\", org.joda.time.LocalDate.now());\n// after\nruntimeService.setVariable(scopeId, \"window\", java.time.LocalDate.now());","handlingStrategy":"validation","validationCode":"if (value instanceof org.joda.time.LocalDate) { value = ((org.joda.time.LocalDate) value).toDateTimeAtStartOfDay().toGregorianCalendar().toZonedDateTime().toLocalDate(); }","typeGuard":"boolean isJodaLocalDate(Object v) { return v instanceof org.joda.time.LocalDate; }","tryCatchPattern":null,"preventionTips":["Convert Joda to java.time before setting scoped variables","Log/monitor deprecation warnings to find remaining Joda usages","Pin a migration milestone before Flowable's Joda removal release"],"tags":["deprecation","joda-time","variables"],"backgroundTag":"deprecated-api-usage","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"}