det101 commented on code in PR #18585:
URL:
https://github.com/apache/dolphinscheduler/pull/18585#discussion_r4056307665
##########
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/TaskDefinitionController.java:
##########
@@ -88,7 +92,17 @@ public Result queryTaskDefinitionVersions(@Parameter(hidden
= true) @RequestAttr
@RequestParam(value = "pageNo")
int pageNo,
@RequestParam(value =
"pageSize") int pageSize) {
checkPageParams(pageNo, pageSize);
- return taskDefinitionService.queryTaskDefinitionVersions(loginUser,
projectCode, code, pageNo, pageSize);
+ Result result =
taskDefinitionService.queryTaskDefinitionVersions(loginUser, projectCode, code,
pageNo,
+ pageSize);
+ @SuppressWarnings("unchecked")
Review Comment:
Updated to option 1: typed the three service methods as
`Result<PageInfo<...>>` (`queryTaskDefinitionVersions`,
`queryWorkflowDefinitionVersions`, `queryTaskListPaging`) so the controllers
can call `result.getData()` without `@SuppressWarnings("unchecked")`. This
matches the existing paging API style in this module.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]