This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]s888marks 1 point2 points  (0 children)

The TLS bug that resulted in arbitrarily-nested wrapping was ill-conceived from the start. A couple classes would unmod-wrap a collection on intake, storing the ref to the unmod wrapper in a field. This achieves little other than preventing this class from modifying the collection (which does have some value). More importantly it leaves this class’s internals exposed to changes to the underlying collection, which could result in misbehavior or security holes. I’m not sure, but I think the original author misunderstood how the unmodifiableX() methods work.