uschindler edited a comment on pull request #2429:
URL: https://github.com/apache/lucene-solr/pull/2429#issuecomment-790589517


   Hi,
   I agree with Mike. I like the equals() method to be thread safe. That was my 
original proposal.
   Generally: BytesRefHash is my favourite class if you need a `Set<String>`. 
Although it's marked internal, I prefer to use it. Especially if you need a set 
of millions of strings, this is fast and does not produce millions of Strings. 
I personally used it only single threaded, but in all cases a method called 
equals should never ever change state. Sorry!
   
   +1 for the fix
   -1 to add the unmodifiable interface. That's over-engineered.
   
   Uwe
   


----------------------------------------------------------------
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:
us...@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org
For additional commands, e-mail: issues-h...@lucene.apache.org

Reply via email to