Martin Sladecek martin.sladecek at
Wed Jan 9 00:26:26 PST 2013

On 01/09/2013 01:15 AM, Richard Bair wrote:
>> TransformationList is not modifiable. We had a big discussion about this (together with Micheal Heinrichs) about 2 years ago a decided we have to make all TransformationList subclasses unmodifiable as otherwise it would break the List contract. We'd have to have special implementation of sort for the WrappedList.
> Several collections in the JDK explicitly state they violate the contract of List / Map / Set in some way or other. I wonder if it would be better to do so here?
Please, do we really have to start this discussion again? :-)

The problem is that the violation would be massive, only some things 
would work according to the contract, some only under specific 
conditions and it would also vary between filtered() and sorted(). If 
you consider getViewList() as a certain source of future bugs, it's 
nothing comparing to this. It would really require deep understanding of 
how these lists work and careful consideration of every step. Working 
with such API would be like walking in a minefield.

Last time it was Brian Goetz ho persuaded you, I'm sure I have the mail 
conversation somewhere...


More information about the openjfx-dev mailing list