{"record":{"id":"d3219aceaa55a84a","repo":"flowable/flowable-engine","slug":"using-joda-time-localdate-has-been-deprecated-and-d3219a","errorCode":null,"errorMessage":"Using Joda-Time LocalDate has been deprecated and will be removed in a future version. Task Variable {} in task {} was a Joda-Time LocalDate. ","messagePattern":"Using Joda-Time LocalDate has been deprecated and will be removed in a future version\\. Task Variable (.+?) in task (.+?) 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":58,"sourceCode":"            return true;\n        }\n        return LocalDate.class.isAssignableFrom(value.getClass());\n    }\n\n    @Override\n    public Object getValue(ValueFields valueFields) {\n        Long longValue = valueFields.getLongValue();\n        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":40,"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#L40-L76","documentation":"A deprecation warning logged by JodaDateType.setValue when a variable attached to a task holds a Joda-Time LocalDate. Flowable persists it as start-of-day millis and warns Joda-Time support will be removed. Execution continues normally.","triggerScenarios":"taskService.setVariable(...) or execution.setVariable on a variable whose value is an org.joda.time.LocalDate and whose ValueFields has a taskId set.","commonSituations":"Pre-java.time code storing LocalDate variables on user tasks; migrated Activiti 5 processes using Joda types.","solutions":["Convert the value to java.time.LocalDate (java.time API is supported natively)","Replace org.joda.time.LocalDate usage in the calling code","Suppress/ignore the warning only as a short-term measure while migrating"],"exampleFix":"// before\nMap<String, Object> vars = new HashMap<>();\nvars.put(\"startDate\", org.joda.time.LocalDate.now());\ntaskService.setVariablesLocal(taskId, vars);\n// after\nvars.put(\"startDate\", java.time.LocalDate.now());","handlingStrategy":"validation","validationCode":"if (value instanceof org.joda.time.LocalDate) { value = java.time.LocalDate.parse(value.toString()); }","typeGuard":"boolean isJodaLocalDate(Object v) { return v instanceof org.joda.time.LocalDate; }","tryCatchPattern":null,"preventionTips":["Use java.time.LocalDate for task-local variables","Centralize variable marshalling in one utility that converts Joda types","Add a deprecation-aware lint rule for org.joda imports"],"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"}