Uploaded image for project: 'Commons FileUpload'
  1. Commons FileUpload
  2. FILEUPLOAD-264

Let ServletFileUpload implement Iterable<FileUploadStream>

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • None
    • None

    Description

      ServletFileUpload implements a custom iterator, which doesn't implement java.util.Iterator. We should consider implementing Iterable<FileUploadStream> on ServletFileUpload so that is can be used in enhanced for loops. Further more, the iterator could then be used by other APIs which consume Iterator instances. The iterator returned by the Iterable.iterator() method could be a thin wrapper around FileItemIterator, which throughs UnsupportedOperationException when remove() is called.

      Attachments

        Activity

          People

            Unassigned Unassigned
            britter Benedikt Ritter
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: