[
https://issues.apache.org/jira/browse/ZOOKEEPER-2194?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Chris Nauroth updated ZOOKEEPER-2194:
-------------------------------------
Component/s: server
+1 (non-binding) for patch v2, pending a Jenkins test run. I'll submit it now.
I can't assign the issue to you, so I think we'll need help from a committer
to have you listed as a contributor, and then the issue can be assigned to you.
Thank you for incorporating the code review feedback.
> Let DataNode.getChildren() return an unmodifiable view of its children set
> --------------------------------------------------------------------------
>
> Key: ZOOKEEPER-2194
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2194
> Project: ZooKeeper
> Issue Type: Improvement
> Components: server
> Reporter: Hitoshi Mitake
> Priority: Trivial
> Attachments: ZOOKEEPER-2194-v2.patch, ZOOKEEPER-2194.patch
>
>
> Current DataNode.getChildren() directly returns a pointer of its private
> member, children. However, the member should be modified through addChild()
> and removeChild(). Callers of getChildren() shouldn't modify it directly.
> For preventing the direct modification by the callers, this patch lets
> getChildren() return an unmodifiable view of its children set. If the callers
> try to modify directly, runtime exception will be risen.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)