Uploaded image for project: 'Wicket'
  1. Wicket
  2. WICKET-2469

Allow using a different FileItemFactory by extracting a method in MultipartServletWebRequest class

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 1.4.1
    • 1.4.2, 1.5-M1
    • wicket
    • None
    • Anyone

    Description

      Hi there:

      In MultipartServletWebRequest constructor we have:
      ...
      (line 93) DiskFileItemFactory factory = new DiskFileItemFactory();
      ...
      which inhibits anyone from reusing MultipartServletWebRequest with a different factory. The only solution is generate a new class that is a copy of this one, with that line changed.

      The suggestion is to extract this code into a protected method, so we could just extend this class when there's a need to use a different factory (as in GAE applications).
      A diff file is added.

      Thanks in advance,

      Esteban

      Attachments

        1. refactor.diff
          0.5 kB
          Esteban Masoero

        Activity

          People

            ivaynberg Igor Vaynberg
            esigma5 Esteban Masoero
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: