You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@struts.apache.org by ni...@apache.org on 2008/01/26 09:53:14 UTC
svn commit: r615436 -
/struts/struts2/trunk/core/src/main/java/org/apache/struts2/interceptor/FileUploadInterceptor.java
Author: nilsga
Date: Sat Jan 26 00:53:12 2008
New Revision: 615436
URL: http://svn.apache.org/viewvc?rev=615436&view=rev
Log:
WW-2240 Temporary workaround for NPE problems when doing info logging. Patch by Benjamin McCann
Modified:
struts/struts2/trunk/core/src/main/java/org/apache/struts2/interceptor/FileUploadInterceptor.java
Modified: struts/struts2/trunk/core/src/main/java/org/apache/struts2/interceptor/FileUploadInterceptor.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/interceptor/FileUploadInterceptor.java?rev=615436&r1=615435&r2=615436&view=diff
==============================================================================
--- struts/struts2/trunk/core/src/main/java/org/apache/struts2/interceptor/FileUploadInterceptor.java (original)
+++ struts/struts2/trunk/core/src/main/java/org/apache/struts2/interceptor/FileUploadInterceptor.java Sat Jan 26 00:53:12 2008
@@ -274,8 +274,9 @@
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();
}