diff --git a/core/src/main/java/org/apache/struts2/interceptor/FileUploadInterceptor.java b/core/src/main/java/org/apache/struts2/interceptor/FileUploadInterceptor.java index 03d13d1fa..961720f62 100644 --- a/core/src/main/java/org/apache/struts2/interceptor/FileUploadInterceptor.java +++ b/core/src/main/java/org/apache/struts2/interceptor/FileUploadInterceptor.java @@ -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(); }