amaliujia commented on a change in pull request #401:
URL: https://github.com/apache/incubator-ratis/pull/401#discussion_r562388681



##########
File path: ratis-common/src/main/java/org/apache/ratis/protocol/RaftPeer.java
##########
@@ -163,9 +213,13 @@ public RaftPeerProto getRaftPeerProto() {
   @Override
   public String toString() {
     final String rpc = address != null? "|rpc:" + address: "";
+    final String admin = adminAddress != null && !Objects.equals(address, 
adminAddress)
+        ? "|admin:" + adminAddress : "";
+    final String client = clientAddress != null && !Objects.equals(address, 
clientAddress)
+        ? "|client:" + clientAddress : "";

Review comment:
       Nit: I think it is more readable to move "|admin:" and "|client:" before 
the `?` thus these string will always be generated. 




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

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to