[
https://issues.apache.org/jira/browse/ZOOKEEPER-4381?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
ASF GitHub Bot updated ZOOKEEPER-4381:
--------------------------------------
Labels: pull-request-available (was: )
> Remove magic string in QuorumPeerConfig
> ---------------------------------------
>
> Key: ZOOKEEPER-4381
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-4381
> Project: ZooKeeper
> Issue Type: Improvement
> Reporter: Wenjun Ruan
> Priority: Minor
> Labels: pull-request-available
> Time Spent: 10m
> Remaining Estimate: 0h
>
> Currently, we write magic string in QuorumPeerConfig, this may not be a good
> practice.
> https://stackoverflow.com/questions/47882/what-is-a-magic-number-and-why-is-it-bad
> {code:java}
> if (key.equals("dataDir")) {
> dataDir = vff.create(value);
> } else if (key.equals("dataLogDir")) {
> dataLogDir = vff.create(value);
> }
> {code}
> It might be better to maintain these configs string in a single class
--
This message was sent by Atlassian Jira
(v8.3.4#803005)