You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Gary D. Gregory (Jira)" <ji...@apache.org> on 2023/09/15 17:15:00 UTC

[jira] (FILEUPLOAD-352) NullPointerException in DiskFileItem#toString

    [ https://issues.apache.org/jira/browse/FILEUPLOAD-352 ]


    Gary D. Gregory deleted comment on FILEUPLOAD-352:
    --------------------------------------------

was (Author: garydgregory):
Please try migrating to 2.0.0-M1.

> NullPointerException in DiskFileItem#toString
> ---------------------------------------------
>
>                 Key: FILEUPLOAD-352
>                 URL: https://issues.apache.org/jira/browse/FILEUPLOAD-352
>             Project: Commons FileUpload
>          Issue Type: Bug
>    Affects Versions: 1.5
>            Reporter: Björn Kautler
>            Priority: Major
>
> Executing this Groovy snippet:
> {code:groovy}
> @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')))
> {code}
> produces a {{NullPointerException}} as {{toString}} tries to access {{dfo}} which is {{null}}.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)