github-code-scanning[bot] commented on code in PR #11886:
URL: https://github.com/apache/dolphinscheduler/pull/11886#discussion_r974815968
##########
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ProcessDefinitionServiceImpl.java:
##########
@@ -242,19 +242,17 @@
String
taskDefinitionJson,
String otherParamsJson,
ProcessExecutionTypeEnum executionType) {
- Project project = projectMapper.queryByCode(projectCode);
- // check user access for project
- Map<String, Object> result =
- projectService.checkProjectAndAuth(loginUser, project,
projectCode, WORKFLOW_CREATE);
- if (result.get(Constants.STATUS) != Status.SUCCESS) {
- return result;
- }
+
+ Map<String, Object> result = new HashMap<>();
Review Comment:
## Unread local variable
Variable 'Map<String,Object> result' is never read.
[Show more
details](https://github.com/apache/dolphinscheduler/security/code-scanning/1472)
##########
dolphinscheduler-api/src/test/java/org/apache/dolphinscheduler/api/service/ProjectServiceTest.java:
##########
@@ -118,23 +118,23 @@
}
+ @Rule
+ public final ExpectedException exception = ExpectedException.none();
Review Comment:
## Deprecated method or constructor invocation
Invoking [ExpectedException.none](1) should be avoided because it has been
deprecated.
[Show more
details](https://github.com/apache/dolphinscheduler/security/code-scanning/1468)
##########
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ProcessDefinitionServiceImpl.java:
##########
@@ -469,10 +461,9 @@
Integer userId,
Integer pageNo,
Integer pageSize) {
- Project project = projectMapper.queryByCode(projectCode);
-
+ Result result = new Result();
Review Comment:
## Unread local variable
Variable 'Result<> result' is never read.
[Show more
details](https://github.com/apache/dolphinscheduler/security/code-scanning/1473)
--
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]