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

NullPointerException in DiskFileItem#toString

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 1.5
    • 2.0.0-M2
    • None

    Description

      Executing this Groovy snippet:

      @Grab('org.apache.commons:commons-fileupload:+')
      import org.apache.commons.fileupload.disk.DiskFileItem
      
      println(new DiskFileItem('test2.txt', 'text/plain', false, 'test2.txt', 512, new File('test2.txt')))
      

      produces a NullPointerException as toString tries to access dfo which is null.

      Attachments

        Activity

          People

            ggregory Gary D. Gregory
            vampire Björn Kautler
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: