[
https://issues.apache.org/jira/browse/CHAIN-101?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13695356#comment-13695356
]
Sebb commented on CHAIN-101:
----------------------------
I agree with the original poster.
Unless ContextMap "is a" ConcurrentHashMap it should probably not extend it.
Also, maybe one day there will be an alternative implementation that would be
better for some circumstances.
I don't think the chore of having to implement all the Map methods should be a
deciding factor.
Indeed only supporting the Map interface gives protection against
ConcurrentHashMap adding a method which could be used to subvert ContextMap.
> Change ContextMap from an inheritance based to a delegation based design
> ------------------------------------------------------------------------
>
> Key: CHAIN-101
> URL: https://issues.apache.org/jira/browse/CHAIN-101
> Project: Commons Chain
> Issue Type: Improvement
> Affects Versions: 2.0
> Reporter: Benedikt Ritter
> Fix For: 2.0
>
>
> Currently ContextMap extends ConcurrentHashMap, but there is nothing we gain
> from this design decision. A delegation based implementation that takes a Map
> as constructor arguments and delegates calls to the wrapped map yields higher
> flexibility.
--
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