[concurrency-interest] CopyOnWriteArrayNavigableSet too late for JEP 266?
jsampson at guidewire.com
Tue Oct 27 21:00:00 EDT 2015
Nathan Reynolds wrote:
> There is a JDK bug on using sets for interning.
> See https://bugs.openjdk.java.net/browse/JDK-8025414
> Aaron Grunthal wrote:
> > One useful advantage of Navigable-/SortedSet is that one can not
> > only test the presence of an element but also extract the
> > matching element by (ab)using the floor/ceil methods.
> > Regular sets cannot be used for interning and a Map has the
> > added overhead/indirection with its Map.Entry objects.
I'm probably just confused as usual, but don't most of the standard
Set implementations simply wrap a Map anyway? E.g. a HashSet wraps a
HashMap; a TreeSet wraps a TreeMap; a ConcurrentSkipListSet wraps a
More information about the Concurrency-interest