On 2015-10-12 17:56, Alan Bateman wrote:

This looks okay (just missing the a space in =Collections) but I'm curious if it does actual reduce the number of classes loaded at startup. I would think ArrayList and unmodifiable list would be popular.

I filed this RFE, so this looks okay to me as well. :-)

I recall verifying that this drops a few tiny Collections.unmodifiableXX-related classes from various small applications. Also at least 2 fewer Objects on the heap.


(Your patch makes me wonder if Collections.unmodifiableXXX should return emptyXXX when the collection is empty).

There's that small chance that someone is synchronizing on their (possibly empty) unmodifiableXXX collections, and this might not help anyone enough to justify even the most far-fetched compatibility risk.

/Claes


-Alan

Reply via email to