You are viewing a plain text version of this content. The canonical link for it is here.
Posted to pluto-dev@portals.apache.org by Christof Dallermassl <cd...@hyperwave.com> on 2004/05/13 10:09:12 UTC
bug in org.apache.pluto.portalImpl.servlet.ServletRequestImpl#getParameter(String)
Hi!
I think the implementation of the method getParameter(String name) in class
org.apache.pluto.portalImpl.servlet.ServletRequestImpl
does not work correctly:
The implementation is:
public String getParameter(String name)
{
return (String) this.getParameterMap().get(name);
}
but the map returned from getParameterMap has a String[] as value. So there
should be a class cast exception if a non-null value is returned.
This version should work better:
public String getParameter(String name)
{
String[] values = getParameterValues(name);
if (values == null)
return (null);
return (values[0]);
}
regards,
Christof
--
---------------------------------------------------------------------------
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
http://www.hyperwave.com
---------------------------------------------------------------------------