ModifiableParameterServletRequest updatedParameterList() uses String instead of
String[]
----------------------------------------------------------------------------------------
Key: MIFOS-4435
URL: http://mifosforge.jira.com/browse/MIFOS-4435
Project: mifos
Issue Type: Bug
Reporter: Michael Vorburger
Priority: Critical
While switching Mifos from on old Servlet 2.4 API JAR to Servlet 3.0 in the
context of my MIFOS-4099 work, I came across a subtle bug (which even going
only to 2.5 would have revealed; because in 2.5 & 3.0 the Servlet API uses Java
Generics, in 2.4 it didn't yet) :
The updatedParameterList() method in the ModifiableParameterServletRequest does:
{code}
Map<String, String> parameterMap = new HashMap<String,
String>(getRequest().getParameterMap());
{code}
But the "The values in the parameter map are of type String array" actually
(have always been), so it's a Map<String, String[]> really... or needs to be
turned from a Map<String, String[]> into a Map<String, String>, if that's what
the code wants to deal with; I've made that assumption and will apply it in a
proposed fix.
Please note that this bug is NOT related to the (my upcoming proposed) adoption
of Servlet v3.0 API - I've only SEEN it in this context, but it's definitely
wrong code today (Servlet 2.4 JAR used in build, or Servlet 2.5 used in current
Tomcat 6) already.
I am unable to judge the severity of this bug (because I do not understand and
don't have time to further dig into what ModifiableParameterServletRequest does
and where it's used and for what). Out of precaution, I'm filing this with
Priority Critical - and let others better judge what to do about it. The
easiest is probably to just apply my patch.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://mifosforge.jira.com/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
------------------------------------------------------------------------------
Learn how Oracle Real Application Clusters (RAC) One Node allows customers
to consolidate database storage, standardize their database environment, and,
should the need arise, upgrade to a full multi-node Oracle RAC database
without downtime or disruption
http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________
Mifos-issues mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mifos-issues