[
https://issues.apache.org/jira/browse/ZOOKEEPER-2194?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14574298#comment-14574298
]
Hudson commented on ZOOKEEPER-2194:
-----------------------------------
SUCCESS: Integrated in ZooKeeper-trunk #2716 (See
[https://builds.apache.org/job/ZooKeeper-trunk/2716/])
ZOOKEEPER-2194: Let DataNode.getChildren() return an unmodifiable view of its
children set (Hitoshi Mitake via rgs) (rgs:
http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1683587)
* /zookeeper/trunk/CHANGES.txt
* /zookeeper/trunk/src/java/main/org/apache/zookeeper/server/DataNode.java
> 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
> Affects Versions: 3.4.6, 3.5.0
> Reporter: Hitoshi Mitake
> Assignee: Hitoshi Mitake
> Priority: Trivial
> Fix For: 3.4.7, 3.5.1, 3.6.0
>
> 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)