{"record":{"id":"2f11e1e55e44d0fb","repo":"flowable/flowable-engine","slug":"businesscalendars-can-not-be-null","errorCode":null,"errorMessage":"businessCalendars can not be null","messagePattern":"businessCalendars can not be null","errorType":"validation","errorClass":"java.lang.IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"modules/flowable-engine-common/src/main/java/org/flowable/common/engine/impl/calendar/MapBusinessCalendarManager.java","lineNumber":33,"sourceCode":"import java.util.HashMap;\nimport java.util.Map;\n\nimport org.flowable.common.engine.api.FlowableException;\n\n/**\n * @author Tom Baeyens\n */\npublic class MapBusinessCalendarManager implements BusinessCalendarManager {\n\n    private final Map<String, BusinessCalendar> businessCalendars;\n\n    public MapBusinessCalendarManager() {\n        this.businessCalendars = new HashMap<>();\n    }\n\n    public MapBusinessCalendarManager(Map<String, BusinessCalendar> businessCalendars) {\n        if (businessCalendars == null) {\n            throw new IllegalArgumentException(\"businessCalendars can not be null\");\n        }\n\n        this.businessCalendars = new HashMap<>(businessCalendars);\n    }\n\n    @Override\n    public BusinessCalendar getBusinessCalendar(String businessCalendarRef) {\n        BusinessCalendar businessCalendar = businessCalendars.get(businessCalendarRef);\n        if (businessCalendar == null) {\n            throw new FlowableException(\"Requested business calendar \" + businessCalendarRef +\n                    \" does not exist. Allowed calendars are \" + this.businessCalendars.keySet() + \".\");\n        }\n        return businessCalendar;\n    }\n\n    public BusinessCalendarManager addBusinessCalendar(String businessCalendarRef, BusinessCalendar businessCalendar) {\n        businessCalendars.put(businessCalendarRef, businessCalendar);\n        return this;","sourceCodeStart":15,"sourceCodeEnd":51,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable-engine-common/src/main/java/org/flowable/common/engine/impl/calendar/MapBusinessCalendarManager.java#L15-L51","documentation":"Constructor validation in MapBusinessCalendarManager: the business calendar map passed in is null. The manager requires a (possibly empty) map to look up due-date calculators, and a null map would cause NPEs later during timer/job evaluation.","triggerScenarios":"Thrown at modules/flowable-engine-common/src/main/java/org/flowable/common/engine/impl/calendar/MapBusinessCalendarManager.java:33 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Pass a non-null (possibly empty) map of business calendars","Use the no-arg constructor and register calendars afterwards"],"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"}