On 9/4/06, Dan Connelly <[EMAIL PROTECTED]> wrote:
Christophe:
Please excuse me. I really am creating too many red herrings, however
interesting! This problem is not at all as difficult as I am making it.
There is an extremely general fix for the "unsupported" problem in
ManageableCollectionUtil.
As I should have considered, EList is a java.util.Collection. (And so
it java.util.List.) So its all very general. The problem is that the
*object* converter method in ManageableCollectionUtil applies a very
restrictive test: object.getClass().equals(Collection.class)
I think this can be generalized so it will almost never throw unsupported.
Why not add a general "catchall" test such as this, at the end of the
other tests in the *object* getManageableCollection method:
if (object instanceof Collection) {
return new ManageableCollectionImpl((Collection)object);
}
where ManageableCollectionImpl is a simple delegating wrapper for *any*
Collection (or is a ManageableArrayList when the no-arg constructor is
used)?
Why not let me thinking about that. Can you create a JIRA issue ? Thanks
A similar fix for the *class* converter method is a bit trickier since
all superinterfaces of the presented class need to be examined for the
most specific fit (to avoid the delegation if possible).
-- Dan
--
Best regards,
Christophe