You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@struts.apache.org by he...@apache.org on 2008/06/21 15:34:54 UTC
svn commit: r670196 -
/struts/struts2/trunk/core/src/main/java/org/apache/struts2/interceptor/FileUploadInterceptor.java
Author: hermanns
Date: Sat Jun 21 06:34:53 2008
New Revision: 670196
URL: http://svn.apache.org/viewvc?rev=670196&view=rev
Log:
WW-2240 FileUploadInterceptor causes null pointer exception
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=670196&r1=670195&r2=670196&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 Jun 21 06:34:53 2008
@@ -219,7 +219,7 @@
if (!(request instanceof MultiPartRequestWrapper)) {
if (LOG.isDebugEnabled()) {
ActionProxy proxy = invocation.getProxy();
- LOG.debug(getTextMessage("struts.messages.bypass.request", new Object[]{proxy.getNamespace(), proxy.getActionName()}, ActionContext.getContext().getLocale()));
+ LOG.debug(getTextMessage("struts.messages.bypass.request", new Object[]{proxy.getNamespace(), proxy.getActionName()}, ac.getLocale()));
}
return invocation.invoke();
@@ -285,10 +285,10 @@
}
}
} else {
- LOG.error(getTextMessage(action, "struts.messages.invalid.file", new Object[]{inputName}, ActionContext.getContext().getLocale()));
+ LOG.error(getTextMessage(action, "struts.messages.invalid.file", new Object[]{inputName}, ac.getLocale()));
}
} else {
- LOG.error(getTextMessage(action, "struts.messages.invalid.content.type", new Object[]{inputName}, ActionContext.getContext().getLocale()));
+ LOG.error(getTextMessage(action, "struts.messages.invalid.content.type", new Object[]{inputName}, ac.getLocale()));
}
}
@@ -303,7 +303,7 @@
for (int index = 0; index < file.length; index++) {
File currentFile = file[index];
if (LOG.isInfoEnabled()) {
- LOG.info(getTextMessage(action, "struts.messages.removing.file", new Object[]{inputValue, currentFile}, ActionContext.getContext().getLocale()));
+ LOG.info(getTextMessage(action, "struts.messages.removing.file", new Object[]{inputValue, currentFile}, ac.getLocale()));
}
if ((currentFile != null) && currentFile.isFile()) {
currentFile.delete();