{"record":{"id":"ff2c2d146d31f22d","repo":"flowable/flowable-engine","slug":"deploymenttenantidlike-is-null","errorCode":null,"errorMessage":"deploymentTenantIdLike is null","messagePattern":"deploymentTenantIdLike is null","errorType":"validation","errorClass":"FlowableIllegalArgumentException","httpStatus":null,"severity":"error","filePath":"modules/flowable-app-engine/src/main/java/org/flowable/app/engine/impl/repository/AppDeploymentQueryImpl.java","lineNumber":132,"sourceCode":"            throw new FlowableIllegalArgumentException(\"deploymentKey is null\");\n        }\n        this.key = deploymentKey;\n        return this;\n    }\n\n    @Override\n    public AppDeploymentQueryImpl deploymentTenantId(String tenantId) {\n        if (tenantId == null) {\n            throw new FlowableIllegalArgumentException(\"deploymentTenantId is null\");\n        }\n        this.tenantId = tenantId;\n        return this;\n    }\n\n    @Override\n    public AppDeploymentQueryImpl deploymentTenantIdLike(String tenantIdLike) {\n        if (tenantIdLike == null) {\n            throw new FlowableIllegalArgumentException(\"deploymentTenantIdLike is null\");\n        }\n        this.tenantIdLike = tenantIdLike;\n        return this;\n    }\n\n    @Override\n    public AppDeploymentQueryImpl deploymentWithoutTenantId() {\n        this.withoutTenantId = true;\n        return this;\n    }\n\n    @Override\n    public AppDeploymentQueryImpl latest() {\n        if (key == null) {\n            throw new FlowableIllegalArgumentException(\"latest can only be used together with a deployment key\");\n        }\n\n        this.latest = true;","sourceCodeStart":114,"sourceCodeEnd":150,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable-app-engine/src/main/java/org/flowable/app/engine/impl/repository/AppDeploymentQueryImpl.java#L114-L150","documentation":"AppDeploymentQueryImpl.deploymentTenantIdLike(String) throws FlowableIllegalArgumentException when tenantIdLike is null. Like the exact tenant filter, the like-filter is validated eagerly at setter time; null is not treated as 'no filter'. Omit the call entirely to skip tenant filtering.","triggerScenarios":"Calling deploymentTenantIdLike(null) on an AppDeploymentQueryImpl, usually when the like-expression is derived from user input or a config value that is absent.","commonSituations":"Search UIs passing an unset tenant-prefix filter straight through; scripts where a wildcard expression variable was never initialized.","solutions":["Guard the setter call with a null check and skip it when the like-expression is absent","Pass an empty string or a concrete pattern (e.g. \"acme-%\") instead of null if a filter is genuinely wanted","Validate user-supplied filter input before mapping it onto the query"],"exampleFix":"// before\nquery.deploymentTenantIdLike(tenantPrefixPattern);\n// after\nif (tenantPrefixPattern != null) {\n    query.deploymentTenantIdLike(tenantPrefixPattern);\n}","handlingStrategy":"validation","validationCode":"if (tenantIdLike != null && !tenantIdLike.isEmpty()) {\n    query.deploymentTenantIdLike(tenantIdLike);\n}","typeGuard":"boolean hasLikeFilter = tenantIdLike != null && !tenantIdLike.isBlank();","tryCatchPattern":"try {\n    query.deploymentTenantIdLike(pattern);\n} catch (FlowableIllegalArgumentException e) {\n    pattern = null; // drop the filter\n}","preventionTips":["Guard optional like-filters with null/empty checks before applying","Sanitize user input into a valid wildcard pattern, never null","Centralize query building in one helper that filters out null criteria"],"tags":["null-argument","query-builder","flowable"],"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"}