For example in Session there is the method:

public final <M extends Serializable> M getMetaData(final MetaDataKey<M>
key)

This makes it seriously difficult to use this methods for retrieving
vales that have e.g. a MetaDataKey<Collection<String>>, since Collection
does not extend Serializable (although most implementations do). Afaik,
you can only cast your way out of this if you know the actual
implementation type, which is impossible when for instance the
collection was created with Collections.synchronized...

I understand that session-data should be serializable, but I don't think
that it should be enforced like this, because Serializable is just a
marker interface. It doesn't offer an interface/contract. In fact,
having an object that implements Serializable still does not guarantee
that it can be serialized.

Cheers,

Gerrit


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org

Reply via email to