portals-pluto-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christof Dallermassl <cdal...@hyperwave.com>
Subject bug in org.apache.pluto.core.impl.PortletURLImpl.setParameter
Date Fri, 07 May 2004 15:08:58 GMT

I think I found a bug in the following method of class 

    public void setParameter(String name, String value)
        if (name == null || value == null) {
            throw new IllegalArgumentException("name and value must not be 
        parameters.put( name, value);

but the "parameters" map should have a String[] as a value, but here a String 
is set.

As theses parameters are passed to the  
method, at least the javadoc of this method is not  correct, as it states 
that the values are String[]s. I think, in the setParameter method of 
org.apache.pluto.core.impl.PortletURLImp a

parameters.put( name, new String[] {value}); 
instead of

should do, what has to be done, although previously set values would be 
destroyed then. as the method's name is setParameter this is ok for me (and 
the setParameter(String, String[]) method exists.


Christof Dallermassl, Software Developer
Hyperwave Research & Development, Albrechtgasse 9, A-8010 Graz, Austria
Tel. +43 316 82 09 18 - 634, Fax +43 316 82 09 18 - 99
mailto: christof.dallermassl@hyperwave.com

View raw message