portals-pluto-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Blum <bl...@apache.org>
Subject Re: bug in org.apache.pluto.core.impl.PortletURLImpl.setParameter
Date Wed, 12 May 2004 07:32:23 GMT
I agree. Thank you for informing us about the bug. I opened a bug report 
no. 28922 for you and fixed it as proposed.

Michael
	

Christof Dallermassl wrote:
> Hi!
> 
> I think I found a bug in the following method of class 
> org.apache.pluto.core.impl.PortletURLImpl:
> 
>     public void setParameter(String name, String value)
>     {
>         if (name == null || value == null) {
>             throw new IllegalArgumentException("name and value must not be 
> null");
>         }
>         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  
> org.apache.pluto.services.information.PortletURLProvider#setParameters 
> 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
> parameters.put(name,value);
> 
> 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.
> 
> regards,
> Christof
> 


Mime
View raw message