{"record":{"id":"d96bb603cb31645f","repo":"flowable/flowable-engine","slug":"no-resource-name-available","errorCode":null,"errorMessage":"No resource name available","messagePattern":"No resource name available","errorType":"exception","errorClass":"FlowableException","httpStatus":500,"severity":"error","filePath":"modules/flowable-app-engine-rest/src/main/java/org/flowable/app/rest/service/api/repository/AppDefinitionResourceDataResource.java","lineNumber":70,"sourceCode":"\n    @ApiOperation(value = \"Get an app definition resource content\", nickname = \"getAppDefinitionContent\", tags = { \"App Definitions\" })\n    @ApiResponses(value = {\n            @ApiResponse(code = 200, message = \"Indicates both app definition and resource have been found and the resource data has been returned.\"),\n            @ApiResponse(code = 404, message = \"Indicates the requested app definition was not found or there is no resource with the given id present in the app definition. The status-description contains additional information.\")\n    })\n    @GetMapping(value = \"/app-repository/app-definitions/{appDefinitionId}/resourcedata\", produces = \"application/json\")\n    @ResponseBody\n    public byte[] getAppDefinitionResource(@ApiParam(name = \"appDefinitionId\") @PathVariable String appDefinitionId, HttpServletResponse response) {\n        AppDefinition appDefinition = appRepositoryService.getAppDefinition(appDefinitionId);\n\n        if (appDefinition == null) {\n            throw new FlowableObjectNotFoundException(\"Could not find an app definition with id '\" + appDefinitionId);\n        }\n        if (appDefinition.getDeploymentId() == null) {\n            throw new FlowableException(\"No deployment id available\");\n        }\n        if (appDefinition.getResourceName() == null) {\n            throw new FlowableException(\"No resource name available\");\n        }\n        \n        if (restApiInterceptor != null) {\n            restApiInterceptor.accessAppDefinitionInfoById(appDefinition);\n        }\n\n        // Check if deployment exists\n        AppDeployment deployment = appRepositoryService.createDeploymentQuery().deploymentId(appDefinition.getDeploymentId()).singleResult();\n        if (deployment == null) {\n            throw new FlowableObjectNotFoundException(\"Could not find a deployment with id '\" + appDefinition.getDeploymentId());\n        }\n\n        List<String> resourceList = appRepositoryService.getDeploymentResourceNames(appDefinition.getDeploymentId());\n\n        if (resourceList.contains(appDefinition.getResourceName())) {\n            final InputStream resourceStream = appRepositoryService.getResourceAsStream(\n                    appDefinition.getDeploymentId(), appDefinition.getResourceName());\n","sourceCodeStart":52,"sourceCodeEnd":88,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable-app-engine-rest/src/main/java/org/flowable/app/rest/service/api/repository/AppDefinitionResourceDataResource.java#L52-L88","documentation":"Thrown by HistoricTaskInstanceQuery.taskAssigneeIds(Collection) when the assignee collection is null. The method builds a multi-assignee IN predicate and requires a concrete list of assignee identifiers. The null check is the first of several validations on the argument.","triggerScenarios":"Calling taskAssigneeIds(null), e.g., forwarding a nullable list of user IDs from a request, session, or configuration directly into the query.","commonSituations":"An unassigned filter parameter (null instead of a list), a failed lookup that returns null instead of an empty list, or deserialization of a missing JSON array field.","solutions":["Null-check assigneeIds before calling and skip the filter when absent.","Initialize the collection to an empty list at the source and only call taskAssigneeIds when non-empty (empty list also throws).","Make the producer return Collections.emptyList() rather than null for 'no assignees'."],"exampleFix":"// before\nquery.taskAssigneeIds(assignees); // may be null\n\n// after\nif (assignees != null && !assignees.isEmpty()) {\n    query.taskAssigneeIds(assignees);\n}","handlingStrategy":"validation","validationCode":"if (assignees == null) { /* skip filter or return empty result */ }\nelse if (!assignees.isEmpty()) { query.taskAssigneeIds(assignees); }","typeGuard":"static boolean isNonEmpty(Collection<String> c) { return c != null && !c.isEmpty(); }","tryCatchPattern":"try {\n    query.taskAssigneeIds(assignees);\n} catch (FlowableIllegalArgumentException e) {\n    LOG.warn(\"Invalid assignee filter: {}\", e.getMessage());\n    return Collections.emptyList();\n}","preventionTips":["Return emptyList() instead of null from code producing assignee lists","Null-check optional filter inputs before applying them to the query","Centralize assignee-filter application in one validated helper"],"tags":["flowable","query-builder","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"}