healchow commented on code in PR #7230:
URL: https://github.com/apache/inlong/pull/7230#discussion_r1068968674
##########
inlong-manager/manager-service/src/main/java/org/apache/inlong/manager/service/sink/StreamSinkServiceImpl.java:
##########
@@ -372,24 +372,53 @@ public List<? extends StreamSink>
listByCondition(SinkPageRequest request, UserI
@Transactional(rollbackFor = Throwable.class)
public Boolean update(SinkRequest request, String operator) {
LOGGER.info("begin to update sink by id: {}", request);
- this.checkParams(request);
- Preconditions.checkNotNull(request.getId(),
ErrorCodeEnum.ID_IS_EMPTY.getMessage());
-
- // Check if it can be modified
- String groupId = request.getInlongGroupId();
- String streamId = request.getInlongStreamId();
- String sinkName = request.getSinkName();
- groupCheckService.checkGroupStatus(groupId, operator);
-
+ if (request == null) {
Review Comment:
For the "Service" layer method, it is recommended to put the parameter
verification in the "Controller", because the external access is only the
"Controller".
The calls of other "Service" layers in the system are all trusted data, and
no more judgment is needed.
--
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]