RFR [15] 6394757: rev2: AbstractSet.removeAll semantics are surprisingly dependent on relative sizes
Alan Snyder
javalists at cbfiddle.com
Sat May 9 02:40:59 UTC 2020
> On May 8, 2020, at 6:46 PM, Jason Mehrens <jason_mehrens at hotmail.com> wrote:
>
> Given this has been around since JDK 1.3 would it be safe to assume that code that is mixing collections with different membership semantics is already working around this issue and therefore the risk is a bit lower in changing the spec? Lots of concrete implementations already override removeAll anyway.
Hi Jason,
I agree that it is safe to say that existing code that is mixing collections with different membership semantics is already working around this issue, but from that I would conclude that it is hard to justify any changes that risk breaking existing code. It's the code that is not mixing membership semantics that I am concerned about breaking.
The main advantage of improving the framework is reducing the size of the tarpit that developers can fall into.
Alan
More information about the core-libs-dev
mailing list