"juha(a)jboss.org" wrote : "adrian(a)jboss.org" wrote : There's no way
to check whether a collections is modifiable or otherwise.
| |
|
| True. You could address the scenario by catching the UnsupportedOperationException on
Collection.add() and falling back to a default mechanism.
|
| It's not a complete solution but depending on how common you think the use case
is, would address it without extra burden of configuration on user's part.
It doesn't quite work the way you describe.
The collection is first instantiated and then the values added.
We could hack it like you describe, but it wouldn't be very clean.
Maybe it is worth the ugliness for the ease of use? :-)
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4060483#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...