You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomee.apache.org by GitBox <gi...@apache.org> on 2019/06/10 09:57:40 UTC

[GitHub] [tomee] SvetlinZarev commented on issue #485: Use ListOrderedSet for thread context listeners.

SvetlinZarev commented on issue #485: Use ListOrderedSet for thread context listeners.
URL: https://github.com/apache/tomee/pull/485#issuecomment-500360871
 
 
   Hi,
   
   Why not [CopyOnWriteArraySet](https://docs.oracle.com/javase/7/docs/api/java/util/concurrent/CopyOnWriteArraySet.html) from the standard java library ? Same features, but without the additional dependency (ok, the contains() operations is O(n), but it's not used in ThreadContext anyway).
   
   An issue is that now all ThreadContextListeners must properly implement hashcode() and equals(), otherwise that change cannot guarantee that there will be only one instance per listener. But a quick search through the hierarchy reveals that none of the implementations override hashcode/equals. So from my PoV the change as is does not do anything.
   
   Kind regards,
   Svetlin

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services