[ https://issues.apache.org/jira/browse/KAFKA-785?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13592837#comment-13592837 ]
Swapnil Ghike commented on KAFKA-785: ------------------------------------- Can we use val jsonString = if (options.has(jsonFileOpt)) Utils.readFileAsString(jsonFile) else "" ? This way we don't need to provide a default to the required arg. > Resolve bugs in PreferredReplicaLeaderElection admin tool > --------------------------------------------------------- > > Key: KAFKA-785 > URL: https://issues.apache.org/jira/browse/KAFKA-785 > Project: Kafka > Issue Type: Bug > Affects Versions: 0.8 > Reporter: Swapnil Ghike > Assignee: Sriram Subramanian > Priority: Blocker > Labels: kafka-0.8, p2 > Fix For: 0.8 > > Attachments: KAFKA-785.patch > > > 1. Since we run the preferred replica election on all partitions if the > jsonFile is empty, the jsonFileOpt should not be checked in the code as a > required option. > 2. We should not pass "" to Utils.readFileAsString > 3. KAFKA-780 -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira