This is an automated email from the ASF dual-hosted git repository.
mweiler pushed a commit to branch main
in repository
https://gitbox.apache.org/repos/asf/incubator-kie-kogito-runtimes.git
The following commit(s) were added to refs/heads/main by this push:
new 397eaa6909 [No-Issue] UserTasksResource generates endpoints with too
broad throws type (#4084)
397eaa6909 is described below
commit 397eaa6909718ffc0e958d2cebd36244933db8fa
Author: abhijithumbe <[email protected]>
AuthorDate: Sat Oct 11 00:56:03 2025 +0530
[No-Issue] UserTasksResource generates endpoints with too broad throws type
(#4084)
Co-authored-by: abhijithumbe <[email protected]>
---
.../class-templates/usertask/RestResourceUserTaskQuarkusTemplate.java | 4 ++--
.../class-templates/usertask/RestResourceUserTaskSpringTemplate.java | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git
a/kogito-codegen-modules/kogito-codegen-processes/src/main/resources/class-templates/usertask/RestResourceUserTaskQuarkusTemplate.java
b/kogito-codegen-modules/kogito-codegen-processes/src/main/resources/class-templates/usertask/RestResourceUserTaskQuarkusTemplate.java
index 9970e3c28b..a506fe0c0e 100644
---
a/kogito-codegen-modules/kogito-codegen-processes/src/main/resources/class-templates/usertask/RestResourceUserTaskQuarkusTemplate.java
+++
b/kogito-codegen-modules/kogito-codegen-processes/src/main/resources/class-templates/usertask/RestResourceUserTaskQuarkusTemplate.java
@@ -127,7 +127,7 @@ public class UserTasksResource {
@PathParam("taskId") String taskId,
@QueryParam("user") String user,
@QueryParam("group") List<String> groups,
- String body) throws Exception {
+ String body) throws IOException {
Map<String, Object> data = mapper.readValue(body, Map.class);
return userTaskService.setOutputs(taskId, data,
identityProviderFactory.getOrImpersonateIdentity(user,
groups)).orElseThrow(UserTaskInstanceNotFoundException::new);
}
@@ -139,7 +139,7 @@ public class UserTasksResource {
@PathParam("taskId") String taskId,
@QueryParam("user") String user,
@QueryParam("group") List<String> groups,
- String body) throws Exception {
+ String body) throws IOException {
Map<String, Object> data = mapper.readValue(body, Map.class);
return userTaskService.setInputs(taskId, data,
identityProviderFactory.getOrImpersonateIdentity(user,
groups)).orElseThrow(UserTaskInstanceNotFoundException::new);
}
diff --git
a/kogito-codegen-modules/kogito-codegen-processes/src/main/resources/class-templates/usertask/RestResourceUserTaskSpringTemplate.java
b/kogito-codegen-modules/kogito-codegen-processes/src/main/resources/class-templates/usertask/RestResourceUserTaskSpringTemplate.java
index d99f4c8ac6..10de52ef8d 100644
---
a/kogito-codegen-modules/kogito-codegen-processes/src/main/resources/class-templates/usertask/RestResourceUserTaskSpringTemplate.java
+++
b/kogito-codegen-modules/kogito-codegen-processes/src/main/resources/class-templates/usertask/RestResourceUserTaskSpringTemplate.java
@@ -129,7 +129,7 @@ public class UserTasksResource {
@PathVariable("taskId") String taskId,
@RequestParam(value = "user", required = false) String user,
@RequestParam(value = "group", required = false) List<String>
groups,
- @RequestBody String body) throws Exception {
+ @RequestBody String body) throws IOException {
Map<String, Object> data = mapper.readValue(body, Map.class);
return userTaskService.setOutputs(taskId, data,
identityProviderFactory.getOrImpersonateIdentity(user, groups)).orElseThrow(()
-> new ResponseStatusException(HttpStatus.NOT_FOUND));
}
@@ -139,7 +139,7 @@ public class UserTasksResource {
@PathVariable("taskId") String taskId,
@RequestParam(value = "user", required = false) String user,
@RequestParam(value = "group", required = false) List<String>
groups,
- @RequestBody String body) throws Exception {
+ @RequestBody String body) throws IOException {
Map<String, Object> data = mapper.readValue(body, Map.class);
return userTaskService.setInputs(taskId, data,
identityProviderFactory.getOrImpersonateIdentity(user, groups)).orElseThrow(()
-> new ResponseStatusException(HttpStatus.NOT_FOUND));
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]