{"record":{"id":"1bf00a790612e8fa","repo":"flowable/flowable-engine","slug":"provided-type-is-null","errorCode":null,"errorMessage":"Provided type is null","messagePattern":"Provided type is null","errorType":"validation","errorClass":"FlowableIllegalArgumentException","httpStatus":null,"severity":"error","filePath":"modules/flowable-idm-engine/src/main/java/org/flowable/idm/engine/impl/GroupQueryImpl.java","lineNumber":103,"sourceCode":"            throw new FlowableIllegalArgumentException(\"Provided name is null\");\n        }\n        this.nameLike = nameLike;\n        return this;\n    }\n\n    @Override\n    public GroupQuery groupNameLikeIgnoreCase(String nameLikeIgnoreCase) {\n        if (nameLikeIgnoreCase == null) {\n            throw new FlowableIllegalArgumentException(\"Provided name is null\");\n        }\n        this.nameLikeIgnoreCase = nameLikeIgnoreCase.toLowerCase();\n        return this;\n    }\n\n    @Override\n    public GroupQuery groupType(String type) {\n        if (type == null) {\n            throw new FlowableIllegalArgumentException(\"Provided type is null\");\n        }\n        this.type = type;\n        return this;\n    }\n\n    @Override\n    public GroupQuery groupMember(String userId) {\n        if (userId == null) {\n            throw new FlowableIllegalArgumentException(\"Provided userId is null\");\n        }\n        this.userId = userId;\n        return this;\n    }\n\n    @Override\n    public GroupQuery groupMembers(List<String> userIds) {\n        if (userIds == null) {\n            throw new FlowableIllegalArgumentException(\"Provided userIds is null\");","sourceCodeStart":85,"sourceCodeEnd":121,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable-idm-engine/src/main/java/org/flowable/idm/engine/impl/GroupQueryImpl.java#L85-L121","documentation":"Fluent-setter validation in GroupQueryImpl.groupType: a null group type filter was supplied; the builder rejects it rather than silently ignoring the constraint.","triggerScenarios":"Calling .groupType(null) — typically a nullable type field from configuration, a request parameter, or an enum lookup that returned null.","commonSituations":"Filtering by group type where the type filter is optional, mapping a UI dropdown's 'any' option to null instead of omitting the filter, enum valueOf on unknown strings.","solutions":["Null-check the type before calling groupType(); skip the filter when absent.","Treat 'any type' as omission of the criterion rather than a null value.","Validate the type against allowed values at the boundary.","If using enum lookups, use a safe mapping with a default or throw a clearer domain error."],"exampleFix":"// before\nString type = filter.getType(); // may be null\nquery = identityService.createGroupQuery().groupType(type);\n// after\nGroupQuery query = identityService.createGroupQuery();\nif (filter.getType() != null) {\n    query = query.groupType(filter.getType());\n}","handlingStrategy":"validation","validationCode":"GroupQuery q = identityService.createGroupQuery();\nif (type != null) {\n    q = q.groupType(type);\n}","typeGuard":null,"tryCatchPattern":"try {\n    q = q.groupType(type);\n} catch (FlowableIllegalArgumentException e) {\n    throw new BadRequestException(\"group type must not be null\", e);\n}","preventionTips":["Map UI 'any type' selections to omission of the criterion, not null.","Validate type values against an allow-list at the boundary.","Use safe enum lookups with defaults instead of raw valueOf.","Test query building with all optional filters unset."],"tags":["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-18T11:17:12.947Z"}