You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@inlong.apache.org by GitBox <gi...@apache.org> on 2022/03/07 05:47:29 UTC

[GitHub] [incubator-inlong] healchow commented on a change in pull request #2964: [INLONG-2963][Manager] Fix get Pulsar url in CommonOperateService

healchow commented on a change in pull request #2964:
URL: https://github.com/apache/incubator-inlong/pull/2964#discussion_r820396908



##########
File path: inlong-manager/manager-service/src/main/java/org/apache/inlong/manager/service/CommonOperateService.java
##########
@@ -74,8 +74,12 @@ public String getSpecifiedParam(String key) {
             case Constant.PULSAR_SERVICEURL: {
                 clusterEntity = getThirdPartyCluster(Constant.MIDDLEWARE_PULSAR);
                 if (clusterEntity != null) {
-                    params = gson.fromJson(clusterEntity.getExtParams(), Map.class);
-                    result = params.get(key);
+                    if (key.equals(Constant.PULSAR_SERVICEURL)) {

Review comment:
       In the `case` statement, you have already checked the key matches `Constant.PULSAR_SERVICEURL`, so it's recommended to remove this `if`, and do your work in `case Constant.PULSAR_ADMINURL` and `case Constant.PULSAR_SERVICEURL`.




-- 
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: commits-unsubscribe@inlong.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org