[jboss-dev-forums] [Design the new POJO MicroContainer] - AbstractCollectionMetaData fails with optional add() operati

juha@jboss.org do-not-reply at jboss.com
Tue Jul 3 20:46:31 EDT 2007


I'm mapping a bean with a java.util.List type property where the bean getter returns a read-only view of the list via Collections.unmodifiableList(original).

org.jboss.beans.metadata.plugins.AbstractCollectionMetaData#getValue fails here with a deployment exception since the method does not ensure the collection instance supports the optional Collection.add() operation (and doesn't fall back to default collection)

*** DEPLOYMENTS IN ERROR: Name -> Error
Manager -> java.lang.UnsupportedOperationException

It seems rather unintuitive that the MC requires the read-method to provide a mutable collection reference and proceeds to make changes to my collection via read-method access?


View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4060208#4060208

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4060208



More information about the jboss-dev-forums mailing list