healchow commented on code in PR #4135:
URL: https://github.com/apache/incubator-inlong/pull/4135#discussion_r868788080


##########
inlong-manager/manager-service/src/main/java/org/apache/inlong/manager/service/source/StreamSourceServiceImpl.java:
##########
@@ -87,8 +88,14 @@ public Integer save(SourceRequest request, String operator) {
     }
 
     @Override
-    public SourceResponse get(Integer id, String sourceType) {
-        StreamSourceOperation operation = 
operationFactory.getInstance(SourceType.forType(sourceType));
+    public SourceResponse get(Integer id) {
+        Preconditions.checkNotNull(id, "source id is empty");
+        StreamSourceEntity entity = sourceMapper.selectById(id);

Review Comment:
   There is no need to judge whether it exists or not, because the next 
`operation.getById()` will change it.



-- 
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]

Reply via email to