On Fri, Nov 18, 2011 at 3:22 PM, Julien Vermillard <[email protected]>wrote:

>
> Just an idea, in place of building an AttributeKey objct perhaps we can do
> :
> session.addParameter(MyClass.class,"thekey",theValue);
> and
> Myclass myClass = session.getParameter("thekey");
>
> WDYT ?
>


Setting is safe, but the getter it's still unsafe...

>session.addParameter(MyClass.class,"thekey",theValue);
>NotMyClass myClass = session.getParameter("thekey");
      ^ for the compiler its ok, but at  runtime this will crash with a
ClassCastException

I can provide a prototyp implementation of the proposal ! Who can i
distibute it, does the mailinglist accept file attachments ?

Reply via email to