{"record":{"id":"8de2c992c2066feb","repo":"flowable/flowable-engine","slug":"resourcenamelike-is-null-8de2c9","errorCode":null,"errorMessage":"resourceNameLike is null","messagePattern":"resourceNameLike is null","errorType":"validation","errorClass":"FlowableIllegalArgumentException","httpStatus":null,"severity":"error","filePath":"modules/flowable-event-registry/src/main/java/org/flowable/eventregistry/impl/EventDefinitionQueryImpl.java","lineNumber":252,"sourceCode":"    @Override\n    public EventDefinitionQueryImpl latestVersion() {\n        this.latest = true;\n        return this;\n    }\n\n    @Override\n    public EventDefinitionQueryImpl eventDefinitionResourceName(String resourceName) {\n        if (resourceName == null) {\n            throw new FlowableIllegalArgumentException(\"resourceName is null\");\n        }\n        this.resourceName = resourceName;\n        return this;\n    }\n\n    @Override\n    public EventDefinitionQueryImpl eventDefinitionResourceNameLike(String resourceNameLike) {\n        if (resourceNameLike == null) {\n            throw new FlowableIllegalArgumentException(\"resourceNameLike is null\");\n        }\n        this.resourceNameLike = resourceNameLike;\n        return this;\n    }\n\n    @Override\n    public EventDefinitionQueryImpl tenantId(String tenantId) {\n        if (tenantId == null) {\n            throw new FlowableIllegalArgumentException(\"form tenantId is null\");\n        }\n        this.tenantId = tenantId;\n        return this;\n    }\n\n    @Override\n    public EventDefinitionQueryImpl tenantIdLike(String tenantIdLike) {\n        if (tenantIdLike == null) {\n            throw new FlowableIllegalArgumentException(\"form tenantId is null\");","sourceCodeStart":234,"sourceCodeEnd":270,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable-event-registry/src/main/java/org/flowable/eventregistry/impl/EventDefinitionQueryImpl.java#L234-L270","documentation":"EventDefinitionQueryImpl.eventDefinitionResourceNameLike sets a LIKE-pattern filter on the event definition resource name. It throws FlowableIllegalArgumentException when resourceNameLike is null, since a null pattern is an invalid filter value.","triggerScenarios":"Calling eventDefinitionResourceNameLike(null), e.g. when a wildcard pattern is built dynamically from user input or an optional configuration entry that is absent.","commonSituations":"Pattern construction from config placeholders left unset, search UI passing through empty/null filter terms, copy-paste from exact-match call sites.","solutions":["Pass a non-null pattern, using % wildcards as needed (e.g. \"%my.event\")","Skip the filter call when no pattern is available instead of passing null","Build the pattern with a default value like \"%\" if you intend a catch-all"],"exampleFix":"// before\nquery.eventDefinitionResourceNameLike(null);\n// after\nif (pattern != null) {\n    query.eventDefinitionResourceNameLike(pattern);\n}","handlingStrategy":"validation","validationCode":"if (pattern == null || pattern.isEmpty()) { throw new IllegalArgumentException(\"pattern required for eventDefinitionResourceNameLike()\"); }","typeGuard":"boolean hasText(String s) { return s != null && !s.trim().isEmpty(); }","tryCatchPattern":"try { query.eventDefinitionResourceNameLike(pattern); } catch (FlowableIllegalArgumentException e) { log.warn(\"pattern null, skipping filter\"); }","preventionTips":["Sanitize user-supplied search patterns; never forward raw null/empty values","Apply % wildcards explicitly rather than relying on the library","Null-check dynamically built patterns before chaining the query"],"tags":["flowable","query","null-argument","event-registry"],"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"}