gregh3269 opened a new pull request #435: URL: https://github.com/apache/struts/pull/435
On an empty file upload the storeLocation is null, so adds a file new StrutsUploadedFile(null) List fileList = new ArrayList<>(items.size()); for (FileItem fileItem : items) { File storeLocation = ((DiskFileItem) fileItem).getStoreLocation(); if (fileItem.isInMemory() && storeLocation != null && !storeLocation.exists()) { try { storeLocation.createNewFile(); } catch (IOException e) { LOG.error("Cannot write uploaded empty file to disk: {}", storeLocation.getAbsolutePath(), e); } } fileList.add(new StrutsUploadedFile(storeLocation)); } The FileUploadInterceptor checks for a null file but not null content from the new StrutsUploadedFile(null). ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@struts.apache.org For additional commands, e-mail: dev-h...@struts.apache.org