commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sebb (JIRA)" <j...@apache.org>
Subject [jira] [Created] (FILEUPLOAD-247) DiskFileItem does not check fields for null before derefencing them
Date Sat, 15 Feb 2014 22:44:19 GMT
Sebb created FILEUPLOAD-247:
-------------------------------

             Summary: DiskFileItem does not check fields for null before derefencing them
                 Key: FILEUPLOAD-247
                 URL: https://issues.apache.org/jira/browse/FILEUPLOAD-247
             Project: Commons FileUpload
          Issue Type: Bug
            Reporter: Sebb


DiskFileItem does not check fields for null before derefencing them.

This can cause some unexpected NPE failures, for example:

{code}
FileItem item = new DiskFileItem("Field", null, true, null, 16, repository);
item.isInMemory(); // => NPE
{code}

It may not be possible to avoid throwing an exception, but NPE is not very helpful in determining
the cause of the error.



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

Mime
View raw message