Override Java 8 default methods for correctness and efficiency.
There are several default methods added to Java 8 collections interfaces that are not overridden in Eclipse Collections. Default methods are often composites that delegate to several other methods. For example, Map.compute() delegates to get(), containsKey(), put(), and remove(). For synchronized/concurrent collections, it may be necessary to override for correctness. For others, it can be more efficient to override (to only call hashcode once, for example).
java.util.Collection#removeIf
java.util.Map#replaceAll
java.util.Map#computeIfAbsent
java.util.Map#computeIfPresent
java.util.Map#compute
List.sort() is especially surprising. We did all this work to rename sort to sortThis to not interfere. Now we're in a state where FastList.asSynchronized().sort() is not atomic.
Completed:
java.util.List#sort (complete - released in 10.0 )
java.util.List#replaceAll (complete - released in 10.0 )
java.util.Map#getOrDefault
java.util.Map#forEach (complete - https://github.com/eclipse/eclipse-collections/pull/1425)
java.util.Map#merge
I am working on List#sort and List#replaceAll. For List#sort I am delegating to sortThis.
Can this be revived? UnifiedMap.computeIfAbsent(), for example, looks like a simple override and delegation to getIfAbsentPutWithKey
Thank @ylexus , yes this can be worked on now as next release is a major version.