{"record":{"id":"10ade759873b1e02","repo":"flowable/flowable-engine","slug":"deploymentcategoryexclude-is-null-10ade7","errorCode":null,"errorMessage":"deploymentCategoryExclude is null","messagePattern":"deploymentCategoryExclude is null","errorType":"validation","errorClass":"ActivitiIllegalArgumentException","httpStatus":null,"severity":"error","filePath":"modules/flowable5-engine/src/main/java/org/activiti/engine/impl/DeploymentQueryImpl.java","lineNumber":93,"sourceCode":"            throw new ActivitiIllegalArgumentException(\"deploymentNameLike is null\");\n        }\n        this.nameLike = nameLike;\n        return this;\n    }\n\n    @Override\n    public DeploymentQueryImpl deploymentCategory(String deploymentCategory) {\n        if (deploymentCategory == null) {\n            throw new ActivitiIllegalArgumentException(\"deploymentCategory is null\");\n        }\n        this.category = deploymentCategory;\n        return this;\n    }\n\n    @Override\n    public DeploymentQueryImpl deploymentCategoryNotEquals(String deploymentCategoryNotEquals) {\n        if (deploymentCategoryNotEquals == null) {\n            throw new ActivitiIllegalArgumentException(\"deploymentCategoryExclude is null\");\n        }\n        this.categoryNotEquals = deploymentCategoryNotEquals;\n        return this;\n    }\n\n    @Override\n    public DeploymentQueryImpl deploymentTenantId(String tenantId) {\n        if (tenantId == null) {\n            throw new ActivitiIllegalArgumentException(\"deploymentTenantId is null\");\n        }\n        this.tenantId = tenantId;\n        return this;\n    }\n\n    @Override\n    public DeploymentQueryImpl deploymentTenantIdLike(String tenantIdLike) {\n        if (tenantIdLike == null) {\n            throw new ActivitiIllegalArgumentException(\"deploymentTenantIdLike is null\");","sourceCodeStart":75,"sourceCodeEnd":111,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable5-engine/src/main/java/org/activiti/engine/impl/DeploymentQueryImpl.java#L75-L111","documentation":"DeploymentQueryImpl.deploymentCategoryNotEquals() throws ActivitiIllegalArgumentException when its argument is null. The exclusion filter must be a concrete category value; null cannot be turned into a 'not equals' predicate.","triggerScenarios":"Calling repositoryService.createDeploymentQuery().deploymentCategoryNotEquals(null), e.g. an exclusion list built from config or user input where the excluded category is missing.","commonSituations":"Excluding internal/system categories where the exclusion constant is not defined; passing an unset property through; copy-paste code where the excluded value was removed.","solutions":["Pass a non-null category to exclude","Only apply the exclusion when the value is present","Define the excluded category as a constant/default so it is never null","If you truly want all deployments, omit the call entirely"],"exampleFix":"// before\nquery.deploymentCategoryNotEquals(excludedCategory);\n// after\nif (excludedCategory != null) {\n    query.deploymentCategoryNotEquals(excludedCategory);\n}","handlingStrategy":"validation","validationCode":"if (excludedCategory == null) { throw new IllegalArgumentException(\"excludedCategory must not be null\"); }\nrepositoryService.createDeploymentQuery().deploymentCategoryNotEquals(excludedCategory)...","typeGuard":"boolean hasText(String s) { return s != null && !s.trim().isEmpty(); }","tryCatchPattern":"try {\n    repositoryService.createDeploymentQuery().deploymentCategoryNotEquals(excluded).list();\n} catch (ActivitiIllegalArgumentException e) {\n    log.error(\"exclusion category was null\", e);\n}","preventionTips":["Define exclusion constants rather than nullable variables","Omit the call entirely when no exclusion is wanted","Null-check config-sourced exclusion values"],"tags":["java","activiti","null-argument","query"],"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"}