2012/11/15 Mark Struberg <[email protected]>: > StateCache is defined as generic StateCache<K,V> but the implementations do > some hardcoded upcast: > > public Object restoreSerializedView(FacesContext facesContext, > String viewId, Object viewState) > { > Object[] state = (Object[]) viewState; > > > That's just vodoo. Either the generics usage is wrong or the implementation. > > Why do we try to store the state as generics? All we need is a pluggable > factory which gives me the state of the current request. There is no generics > info in there imo.
It is a work in progress ...... conceptually it is correct to use generics. The idea was make a separation between where the values came from. The idea is replace the cast of Object[] with a proper wrapper in the future. > > LieGrue, > strub >
