Github user eolivelli commented on a diff in the pull request:
https://github.com/apache/zookeeper/pull/722#discussion_r236150403
--- Diff:
zookeeper-server/src/main/java/org/apache/zookeeper/server/quorum/LeaderBean.java
---
@@ -51,6 +51,15 @@ public String followerInfo() {
return sb.toString();
}
+ @Override
+ public String nonVotingFollowerInfo() {
+ StringBuilder sb = new StringBuilder();
+ for (LearnerHandler handler : leader.getNonVotingFollowers()) {
+ sb.append(handler.toString()).append("\n");
--- End diff --
Wouldn't it be better to have a specific toStringForJMX method.
In the future people will change the toString method without thinking that
they are changing the output of a public endpoint
---