WW-2240 Temporary workaround for NPE problems when doing info logging. Patch by Benjamin McCann

git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@615436 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Nils-Helge Garli
2008-01-26 08:53:12 +00:00
parent f5a88391e1
commit b1546d7382
@@ -274,8 +274,9 @@ public class FileUploadInterceptor extends AbstractInterceptor {
File[] file = multiWrapper.getFiles(inputValue);
for (int index = 0; index < file.length; index++) {
File currentFile = file[index];
LOG.info(getTextMessage("struts.messages.removing.file", new Object[]{inputValue, currentFile}, ActionContext.getContext().getLocale()));
if(LOG.isInfoEnabled()) {
LOG.info(getTextMessage("struts.messages.removing.file", new Object[]{inputValue, currentFile}, ActionContext.getContext().getLocale()));
}
if ((currentFile != null) && currentFile.isFile()) {
currentFile.delete();
}