Injects instead of static reference

This commit is contained in:
Lukasz Lenart
2017-03-08 17:43:20 +01:00
parent 239327ea36
commit 4ef6418505
14 changed files with 90 additions and 64 deletions
@@ -154,11 +154,7 @@ public class PellMultiPartRequest extends AbstractMultiPartRequest {
String inputValue = (String) fileParameterNames.nextElement();
UploadedFile[] files = getFile(inputValue);
for (UploadedFile currentFile : files) {
if (LOG.isInfoEnabled()) {
String msg = LocalizedTextUtil.findText(this.getClass(), "struts.messages.removing.file", Locale.ENGLISH,
"no.message.found", new Object[]{inputValue, currentFile});
LOG.info(msg);
}
LOG.debug("Removing file {} {}", inputValue, currentFile);
if ((currentFile != null) && currentFile.isFile()) {
if (!currentFile.delete()) {
LOG.warn("Resource Leaking: Could not remove uploaded file [{}]", currentFile.getAbsolutePath());