Important Notice - Forums is archived
To simplify things and help our users to be more productive, we have archived the current forum and focus our efforts on helping developers on Stack Overflow. You can post new questions on Stack Overflow or join our Discord channel.

Vaadin lets you build secure, UX-first PWAs entirely in Java.
Free ebook & tutorial.
Object vs Serializable in Interfaces
I was wondering why the interfaces for Container, Item, Property all use Object instead of Serializable? This makes it a pain when the servlet session persistent stumbles on an Object that can't be serialized - are there use cases in play that don't include serialization of these objects?
Non-serializable objects only work if one doesn't serialize the session. Thus, use of Serializable in those interfaces could probably have been a better design. In this case I am the one to blame for the design that dates back to year 2002.
Changing the interfaces could break quite a few applications, but fixing the applications shouldn't be too complicated. Maybe we should consider changing this in Vaadin 7? Any opinions about this?
Joonas Lehtinen: Added this proposal to my Vaadin 7 API "brainstorm memo".
Talking about this, what about using generics? It might not be useful for every data type though.
Stéphane Nicoll:
Joonas Lehtinen: Added this proposal to my Vaadin 7 API "brainstorm memo".
Talking about this, what about using generics? It might not be useful for every data type though.
It is not clear to me if you refer to using generics in some specific context or in general, but take a look at #5692, #5731 and #5769.
Big parts of these have been done in the 6.5 branch, but more could be done.
Some contexts cannot use generics e.g. due to limitations of the related mechanisms in Java.