-
Notifications
You must be signed in to change notification settings - Fork 7.3k
ZOOKEEPER-4381: Remove magic string in QuorumPeerConfig #1759
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
base: master
Are you sure you want to change the base?
Conversation
9899a02 to
cb9e7a5
Compare
| */ | ||
| public static void writeDynamicConfig(final String dynamicConfigFilename, final QuorumVerifier qv, final boolean needKeepVersion) throws IOException { | ||
| public static void writeDynamicConfig(final String dynamicConfigFilename, final QuorumVerifier qv, | ||
| final boolean needKeepVersion) throws IOException { |
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.
Great refactor. There're some uncorrelated changes(most are line break). Please revert them.
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.
Thanks for your review, I have reverted the uncorrelated changes, I am not sure if this will make the code style check failed.
a04f7e9 to
dc6deea
Compare
eolivelli
left a comment
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.
I left some nits, overall the patch is good, thanks
| } | ||
| } | ||
|
|
||
| private int parseInt(String key, String value) throws ConfigException { |
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.
static
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.
Done, but I am little confused why we need to change this method to static? Right now, this is not used in a static method. Maybe for future?
| private int parseInt(String key, String value) throws ConfigException { | ||
| try { | ||
| return Integer.parseInt(value); | ||
| } catch (Exception ex) { |
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.
NumberFormatException
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.
Done
| private long parseLong(String key, String value) throws ConfigException { | ||
| try { | ||
| return Long.parseLong(value); | ||
| } catch (Exception ex) { |
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.
NumberFormatException
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.
Done
dc6deea to
4bd0894
Compare
4bd0894 to
35659fe
Compare
No description provided.