[
https://issues.apache.org/jira/browse/ZOOKEEPER-3676?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17010970#comment-17010970
]
David Mollitor commented on ZOOKEEPER-3676:
-------------------------------------------
{code:none}
[ERROR]
src/main/java/org/apache/zookeeper/server/TxnLogProposalIterator.java:[25]
(imports) ImportOrder: Extra separation in import group before
'org.apache.zookeeper.server.persistence.TxnLog.TxnIterator'
[ERROR]
src/test/java/org/apache/zookeeper/server/quorum/LearnerHandlerTest.java:[36,8]
(imports) UnusedImports: Unused import:
org.apache.zookeeper.server.TxnLogProposalIterator.
{code}
> Clean Up TxnLogProposalIterator
> -------------------------------
>
> Key: ZOOKEEPER-3676
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-3676
> Project: ZooKeeper
> Issue Type: Improvement
> Reporter: David Mollitor
> Assignee: David Mollitor
> Priority: Minor
> Labels: pull-request-available
> Time Spent: 0.5h
> Remaining Estimate: 0h
>
> * Use JDK Collections.emptyIterator where needed
> * The the code manually returns an emptyIterator when an error occurs, but
> it's also possible to return an emptyIterator by passing 'null' to the
> TxnLogProposalIterator constructor. This is a bit ambiguous... why allow
> both? Null values 'suck' so I think it's better to just make sure that
> emptyIterator is returned where needed an throw NPE if a 'null' value is
> passed in.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)