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/07 03:46:16 UTC

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

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