Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
1.1.1
-
None
Description
The following code produces a NPE, a more descriptive exception (and exception message) would be helpful.
ServletFileUpload upload = new ServletFileUpload();
try {
List<FileItem> items = upload.parseRequest(request);
/* ... */
} catch (Exception e) {
e.printStackTrace();
}
The exception is:
java.lang.NullPointerException
at org.apache.commons.fileupload.FileUploadBase.createItem(FileUploadBase.java:500)
at org.apache.commons.fileupload.FileUploadBase.parseRequest(FileUploadBase.java:367)
at org.apache.commons.fileupload.servlet.ServletFileUpload.parseRequest(ServletFileUpload.java:116)
...