what's the need for such an abstraction? It just makes dealing with that stuff harder and slower. We know exactly what format we get and store.
LieGrue, strub ----- Original Message ----- > From: Leonardo Uribe <[email protected]> > To: MyFaces Development <[email protected]>; Mark Struberg > <[email protected]> > Cc: > Sent: Thursday, November 15, 2012 9:44 PM > Subject: Re: StateCache question > > 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 >> >
