You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@eventmesh.apache.org by GitBox <gi...@apache.org> on 2022/12/05 04:48:47 UTC

[GitHub] [incubator-eventmesh] jonyangx opened a new pull request, #2464: [ISSUE #2463]runtime module util subpackage pmd warning

jonyangx opened a new pull request, #2464:
URL: https://github.com/apache/incubator-eventmesh/pull/2464

   Fixes #2463 .
   
   ### Motivation
   
   fix runtime module util subpackage pmd warning
   
   ### Modifications
   
   refactor runtime module admin org/apache/eventmesh/runtime/util/*.java file.
   
   ### Documentation
   
   - Does this pull request introduce a new feature? ( no)
   - If yes, how is the feature documented? (not documented)
   
   


-- 
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: dev-unsubscribe@eventmesh.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@eventmesh.apache.org
For additional commands, e-mail: dev-help@eventmesh.apache.org


[GitHub] [incubator-eventmesh] jonyangx merged pull request #2464: [ISSUE #2463]runtime module util subpackage pmd warning

Posted by GitBox <gi...@apache.org>.
jonyangx merged PR #2464:
URL: https://github.com/apache/incubator-eventmesh/pull/2464


-- 
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: dev-unsubscribe@eventmesh.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@eventmesh.apache.org
For additional commands, e-mail: dev-help@eventmesh.apache.org


[GitHub] [incubator-eventmesh] horoc commented on a diff in pull request #2464: [ISSUE #2463]runtime module util subpackage pmd warning

Posted by GitBox <gi...@apache.org>.
horoc commented on code in PR #2464:
URL: https://github.com/apache/incubator-eventmesh/pull/2464#discussion_r1039630853


##########
eventmesh-runtime/src/main/java/org/apache/eventmesh/runtime/util/RemotingHelper.java:
##########
@@ -72,13 +72,13 @@ public static String parseChannelRemoteAddr(final Channel channel) {
         return "";
     }
 
-    public static String parseSocketAddressAddr(SocketAddress socketAddress) {
+    public static String parseSocketAddressAddr(InetSocketAddress socketAddress) {
         if (socketAddress != null) {
-            final String addr = socketAddress.toString();
+            return socketAddress.getAddress().getHostAddress() + ":" + socketAddress.getPort();
 
-            if (addr.length() > 0) {
-                return addr.substring(1);
-            }
+            //if (addr.length() > 0) {
+            //    return addr.substring(1);
+            //}

Review Comment:
   I think it's better to directly delete code here instead of commenting out.



-- 
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: dev-unsubscribe@eventmesh.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@eventmesh.apache.org
For additional commands, e-mail: dev-help@eventmesh.apache.org


[GitHub] [incubator-eventmesh] codecov[bot] commented on pull request #2464: [ISSUE #2463]runtime module util subpackage pmd warning

Posted by GitBox <gi...@apache.org>.
codecov[bot] commented on PR #2464:
URL: https://github.com/apache/incubator-eventmesh/pull/2464#issuecomment-1336768161

   # [Codecov](https://codecov.io/gh/apache/incubator-eventmesh/pull/2464?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#2464](https://codecov.io/gh/apache/incubator-eventmesh/pull/2464?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (db9cb8c) into [master](https://codecov.io/gh/apache/incubator-eventmesh/commit/f8f8f5aac87ed20c4769e44f15df6fa887380774?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (f8f8f5a) will **decrease** coverage by `0.00%`.
   > The diff coverage is `100.00%`.
   
   > :exclamation: Current head db9cb8c differs from pull request most recent head 5e95ed5. Consider uploading reports for the commit 5e95ed5 to get more accurate results
   
   ```diff
   @@             Coverage Diff              @@
   ##             master    #2464      +/-   ##
   ============================================
   - Coverage     11.77%   11.77%   -0.01%     
     Complexity      901      901              
   ============================================
     Files           469      469              
     Lines         27783    27767      -16     
     Branches       3000     2997       -3     
   ============================================
   - Hits           3272     3269       -3     
   + Misses        24216    24203      -13     
     Partials        295      295              
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/incubator-eventmesh/pull/2464?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [.../apache/eventmesh/runtime/util/RemotingHelper.java](https://codecov.io/gh/apache/incubator-eventmesh/pull/2464/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZXZlbnRtZXNoLXJ1bnRpbWUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2V2ZW50bWVzaC9ydW50aW1lL3V0aWwvUmVtb3RpbmdIZWxwZXIuamF2YQ==) | `55.55% <100.00%> (+0.38%)` | :arrow_up: |
   | [.../admin/handler/QueryRecommendEventMeshHandler.java](https://codecov.io/gh/apache/incubator-eventmesh/pull/2464/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZXZlbnRtZXNoLXJ1bnRpbWUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2V2ZW50bWVzaC9ydW50aW1lL2FkbWluL2hhbmRsZXIvUXVlcnlSZWNvbW1lbmRFdmVudE1lc2hIYW5kbGVyLmphdmE=) | `88.88% <0.00%> (-3.71%)` | :arrow_down: |
   | [.../trace/pinpoint/exporter/PinpointSpanExporter.java](https://codecov.io/gh/apache/incubator-eventmesh/pull/2464/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZXZlbnRtZXNoLXRyYWNlLXBsdWdpbi9ldmVudG1lc2gtdHJhY2UtcGlucG9pbnQvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2V2ZW50bWVzaC90cmFjZS9waW5wb2ludC9leHBvcnRlci9QaW5wb2ludFNwYW5FeHBvcnRlci5qYXZh) | `68.24% <0.00%> (-0.68%)` | :arrow_down: |
   | [...che/eventmesh/runtime/boot/AbstractHTTPServer.java](https://codecov.io/gh/apache/incubator-eventmesh/pull/2464/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZXZlbnRtZXNoLXJ1bnRpbWUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2V2ZW50bWVzaC9ydW50aW1lL2Jvb3QvQWJzdHJhY3RIVFRQU2VydmVyLmphdmE=) | `0.00% <0.00%> (ø)` | |
   | [...che/eventmesh/runtime/boot/EventMeshTCPServer.java](https://codecov.io/gh/apache/incubator-eventmesh/pull/2464/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZXZlbnRtZXNoLXJ1bnRpbWUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2V2ZW50bWVzaC9ydW50aW1lL2Jvb3QvRXZlbnRNZXNoVENQU2VydmVyLmphdmE=) | `0.00% <0.00%> (ø)` | |
   | [...sh/client/http/producer/EventMeshHttpProducer.java](https://codecov.io/gh/apache/incubator-eventmesh/pull/2464/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZXZlbnRtZXNoLXNkay1qYXZhL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9ldmVudG1lc2gvY2xpZW50L2h0dHAvcHJvZHVjZXIvRXZlbnRNZXNoSHR0cFByb2R1Y2VyLmphdmE=) | `0.00% <0.00%> (ø)` | |
   | [...core/protocol/http/consumer/EventMeshConsumer.java](https://codecov.io/gh/apache/incubator-eventmesh/pull/2464/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZXZlbnRtZXNoLXJ1bnRpbWUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2V2ZW50bWVzaC9ydW50aW1lL2NvcmUvcHJvdG9jb2wvaHR0cC9jb25zdW1lci9FdmVudE1lc2hDb25zdW1lci5qYXZh) | `0.00% <0.00%> (ø)` | |
   | [.../protocol/tcp/client/group/ClientGroupWrapper.java](https://codecov.io/gh/apache/incubator-eventmesh/pull/2464/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZXZlbnRtZXNoLXJ1bnRpbWUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2V2ZW50bWVzaC9ydW50aW1lL2NvcmUvcHJvdG9jb2wvdGNwL2NsaWVudC9ncm91cC9DbGllbnRHcm91cFdyYXBwZXIuamF2YQ==) | `0.00% <0.00%> (ø)` | |
   | [.../http/processor/SendAsyncRemoteEventProcessor.java](https://codecov.io/gh/apache/incubator-eventmesh/pull/2464/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZXZlbnRtZXNoLXJ1bnRpbWUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2V2ZW50bWVzaC9ydW50aW1lL2NvcmUvcHJvdG9jb2wvaHR0cC9wcm9jZXNzb3IvU2VuZEFzeW5jUmVtb3RlRXZlbnRQcm9jZXNzb3IuamF2YQ==) | `0.00% <0.00%> (ø)` | |
   | [...pl/consumer/ConsumeMessageConcurrentlyService.java](https://codecov.io/gh/apache/incubator-eventmesh/pull/2464/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZXZlbnRtZXNoLWNvbm5lY3Rvci1wbHVnaW4vZXZlbnRtZXNoLWNvbm5lY3Rvci1yb2NrZXRtcS9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvcm9ja2V0bXEvY2xpZW50L2ltcGwvY29uc3VtZXIvQ29uc3VtZU1lc3NhZ2VDb25jdXJyZW50bHlTZXJ2aWNlLmphdmE=) | `0.00% <0.00%> (ø)` | |
   | ... and [1 more](https://codecov.io/gh/apache/incubator-eventmesh/pull/2464/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
   
   :mega: We’re building smart automated test selection to slash your CI/CD build times. [Learn more](https://about.codecov.io/iterative-testing/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   


-- 
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: dev-unsubscribe@eventmesh.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@eventmesh.apache.org
For additional commands, e-mail: dev-help@eventmesh.apache.org


[GitHub] [incubator-eventmesh] jonyangx commented on a diff in pull request #2464: [ISSUE #2463]runtime module util subpackage pmd warning

Posted by GitBox <gi...@apache.org>.
jonyangx commented on code in PR #2464:
URL: https://github.com/apache/incubator-eventmesh/pull/2464#discussion_r1041724840


##########
eventmesh-runtime/src/main/java/org/apache/eventmesh/runtime/util/RemotingHelper.java:
##########
@@ -72,13 +72,13 @@ public static String parseChannelRemoteAddr(final Channel channel) {
         return "";
     }
 
-    public static String parseSocketAddressAddr(SocketAddress socketAddress) {
+    public static String parseSocketAddressAddr(InetSocketAddress socketAddress) {
         if (socketAddress != null) {
-            final String addr = socketAddress.toString();
+            return socketAddress.getAddress().getHostAddress() + ":" + socketAddress.getPort();
 
-            if (addr.length() > 0) {
-                return addr.substring(1);
-            }
+            //if (addr.length() > 0) {
+            //    return addr.substring(1);
+            //}

Review Comment:
   done.



-- 
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: dev-unsubscribe@eventmesh.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@eventmesh.apache.org
For additional commands, e-mail: dev-help@eventmesh.apache.org