[MAGNOLIA-2758] MultipartRequestWrapper.getParameterMap doesn't return a Map of String[] parameters as required by the httpServletRequest specification Created: 03/Jun/09  Updated: 23/Jan/13  Resolved: 15/Jun/09

Status: Closed
Project: Magnolia
Component/s: core
Affects Version/s: 3.6.5, 4.1
Fix Version/s: 4.1.1

Type: Bug Priority: Blocker
Reporter: Fabrizio Giustina Assignee: Fabrizio Giustina
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: Text File MAGNOLIA-2758.patch    
Template:
Patch included:
Yes
Acceptance criteria:
Empty
Task DoD:
[ ]* Doc/release notes changes? Comment present?
[ ]* Downstream builds green?
[ ]* Solution information and context easily available?
[ ]* Tests
[ ]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Bug DoR:
[ ]* Steps to reproduce, expected, and actual results filled
[ ]* Affected version filled
Date of First Response:

 Description   

MultipartRequestWrapper.getParameterMap() returns a Map<String, String>.
However, according to the HttpServletRequest specification this should be Map<String, String[]>.

See http://java.sun.com/javaee/5/docs/api/javax/servlet/ServletRequest.html#getParameterMap()

The values in the parameter map are of type String array

This breaks any custom code that uses request.getParameterMap() inside magnolia, since it ends up in classCast exceptions trying to cast String to String[].



 Comments   
Comment by Fabrizio Giustina [ 03/Jun/09 ]

fixed in revision 25672 for Magnolia 4.1

Comment by Magnolia International [ 03/Jun/09 ]

Reverted commit - will review and reapply patch as soon as 4.1 final is out. Too close to release, sorry.
(we might want to change this behaviour everywhere, not just in the deprecated MultipartForm methods)

Comment by Fabrizio Giustina [ 03/Jun/09 ]

(we might want to change this behaviour everywhere, not just in the deprecated MultipartForm methods)

Already checked, all the getParameterMap() methods delegates to this deprecated one.

Comment by Magnolia International [ 15/Jun/09 ]

Patch reapplied, thanks.

Generated at Mon Feb 12 03:39:48 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.