-
Notifications
You must be signed in to change notification settings - Fork 414
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RATIS-2126. Optimize NotLeaderException message #1124
Conversation
@@ -30,7 +30,7 @@ public class NotLeaderException extends RaftException { | |||
private final Collection<RaftPeer> peers; | |||
|
|||
public NotLeaderException(RaftGroupMemberId memberId, RaftPeer suggestedLeader, Collection<RaftPeer> peers) { | |||
super("Server " + memberId + " is not the leader" + (suggestedLeader != null? " " + suggestedLeader: "")); | |||
super("Server " + memberId + " is not the leader" + (suggestedLeader != null ? " ,suggested leader is: " + suggestedLeader : "")); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@weimingdiit , thanks for working on this! The space should be after the comma, i.e. ", suggested ..."
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@szetszwo Ok, already updated, please review again
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1 the change looks good.
@weimingdiit , there is a checkstyle warning (long line). Could you fix it? |
|
What changes were proposed in this pull request?
Optimize NotLeaderException message
What is the link to the Apache JIRA
https://issues.apache.org/jira/browse/RATIS-2126
How was this patch tested?
Original unit tests suite