I have always preferred the "has-a" approach over the "is-a" approach. It makes things easier to refactor down the road.

-Adrian

On 6/24/2013 7:30 PM, Benedikt Ritter wrote:
Hi,

I just wonder why ContextMap inherits from ConcurrentHashMap. This seems like 
an unnecessary restriction. The context interface makes explicit, that 
implementations do not have to be thread safe. Beside that we loose all thread 
safety a ConcurrentHashMap provides with our not-so-thread-safe implementations 
in ContextMap and ContextBase. I'd suggest to switch from an inheritance based 
approach to a delegation based approach. That leaves users with the liberty to 
choose what ever underlying Map implementation they like for their context.

WDYT?
Benedikt
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to