This has been fixed in the trunk as far as I know.  I brought it up
and even filed a JIRA I believe.  It burned me too. :)

On Thu, Apr 2, 2009 at 11:40 AM, francisco treacy
<[email protected]> wrote:
> i presume this has changed as of 1.4-rc2:
>
>        /**
>         * @see org.apache.wicket.util.value.ValueMap#put(java.lang.String,
> java.lang.Object)
>         */
>       �...@override
>        public Object put(String key, Object value)
>        {
>                if ((value == null) || (value instanceof String) || (value
> instanceof String[]))
>                {
>                        return super.put(key, value);
>                }
>                else
>                {
>                        throw new IllegalArgumentException("You tried to add 
> an object of type " +
>                                value.getClass().getName() + "to your 
> PageParameters for key " + key +
>                                ", but you are only allowed to use String or 
> String[].");
>                }
>        }
>
>
> does somebody know why this has changed?
>
> i don't see why it should no longer accept for example Longs (we use a
> fair amount of params.put("id", long_id)), but there may be a good
> reason.
>
> i understand extending ValueMap can't give us type safety, i.e. can't
> avoid put(String key, Object value) ... but maybe using composition
> instead of inheritance? or in that 'if' allow primitive types as well?
>
> anyway, no biggie but just wondering.
>
> francisco
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to