{"record":{"id":"64f154340649c1ce","repo":"flowable/flowable-engine","slug":"category-is-null","errorCode":null,"errorMessage":"category is null","messagePattern":"category is null","errorType":"validation","errorClass":"FlowableIllegalArgumentException","httpStatus":null,"severity":"error","filePath":"modules/flowable-app-engine/src/main/java/org/flowable/app/engine/impl/repository/AppDefinitionQueryImpl.java","lineNumber":86,"sourceCode":"        this.id = appDefinitionId;\n        return this;\n    }\n\n    @Override\n    public AppDefinitionQuery appDefinitionIds(Set<String> appsDefinitionIds) {\n        if (appsDefinitionIds == null) {\n            throw new FlowableIllegalArgumentException(\"appsDefinitionIds is null\");\n        } else if (appsDefinitionIds.isEmpty()) {\n            throw new FlowableIllegalArgumentException(\"Empty appsDefinitionIds\");\n        }\n        this.ids = appsDefinitionIds;\n        return this;\n    }\n\n    @Override\n    public AppDefinitionQueryImpl appDefinitionCategory(String category) {\n        if (category == null) {\n            throw new FlowableIllegalArgumentException(\"category is null\");\n        }\n        this.category = category;\n        return this;\n    }\n\n    @Override\n    public AppDefinitionQueryImpl appDefinitionCategoryLike(String categoryLike) {\n        if (categoryLike == null) {\n            throw new FlowableIllegalArgumentException(\"categoryLike is null\");\n        }\n        this.categoryLike = categoryLike;\n        return this;\n    }\n\n    @Override\n    public AppDefinitionQueryImpl appDefinitionCategoryNotEquals(String categoryNotEquals) {\n        if (categoryNotEquals == null) {\n            throw new FlowableIllegalArgumentException(\"categoryNotEquals is null\");","sourceCodeStart":68,"sourceCodeEnd":104,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable-app-engine/src/main/java/org/flowable/app/engine/impl/repository/AppDefinitionQueryImpl.java#L68-L104","documentation":"FlowableIllegalArgumentException thrown by AppDefinitionQueryImpl.appDefinitionCategory when the category argument is null. Categories filter app definitions by their category string, and null is rejected in favor of the dedicated appDefinitionCategoryLike or no-filter approaches.","triggerScenarios":"Calling appDefinitionQuery.appDefinitionCategory(null), commonly when the category comes from an unset config value, optional request parameter, or a lookup that returned null.","commonSituations":"Optional category filter wired straight from a null config/request value; user submitted no category; code assumed a default category that was never configured.","solutions":["Only call appDefinitionCategory when the value is non-null; otherwise leave the filter off","Default the category to a concrete value or use appDefinitionCategoryLike(\"%...\") for patterns","Validate/normalize the incoming category parameter before building the query"],"exampleFix":"// before\nquery.appDefinitionCategory(config.getCategory()); // may be null\n// after\nif (config.getCategory() != null) { query.appDefinitionCategory(config.getCategory()); }","handlingStrategy":"type-guard","validationCode":"if (category != null) {\n    query.appDefinitionCategory(category);\n}","typeGuard":"boolean hasCategory(String category) { return category != null && !category.trim().isEmpty(); }","tryCatchPattern":"try {\n    query.appDefinitionCategory(category);\n} catch (FlowableIllegalArgumentException e) {\n    // omit the category filter or apply a default\n}","preventionTips":["Make category filters conditional on presence","Provide a configured default category value","Normalize optional filter inputs (null -> no filter) centrally"],"tags":["flowable","query","null-argument","validation"],"backgroundTag":"null-argument","analyzedSha":"d6d39ce1c69ff244f2d9dc6af756a9b95e865586","analyzedAt":"2026-09-11T06:41:19.413Z","contentChangedAt":"2026-09-11T06:41:19.413Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}