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]

Reply via email to