Uploaded image for project: 'Blossom'
  1. Blossom
  2. BLOSSOM-18

Multipart support doesn't work with Spring 3

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • 1.2
    • 1.1.1
    • None
    • None

      BlossomMultipartRequestWrapper estends AbstractMultipartHttpServletRequest. In Spring 2.5.x, AbstractMultipartHttpServletRequest.setMultipartFiles has a parameter of type Map, but in Sping 3.0.x the parameter has been narrowed to type MultiValueMap, which is an extension of Map included in spring-core 3 (and unfortunately not included in spring 2.5).
      Current BlossomMultipartRequestWrapper is passing a Map to the setMultipartFiles, and using Spring 3 this will cause an exception.

      Before writing a reflection nightmare to populate the right parameter, is there any other way to get around this? Maybe two different BlossomMultipartRequestWrapper compiled for specific spring versions?
      I honestly can't see a simple solution to overcome the problem, even upgrading the dependency to spring version would make it incompatible with older spring, unless MultiValueMap is copied and included in blossom release (which doesn't seem a good idea).

        Acceptance criteria

              tmattsson Tobias Mattsson
              dfghi Danilo Ghirardelli
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved:

                  Bug DoR
                  Task DoD