Browse Source

polishing

pull/23217/head
Juergen Hoeller 16 years ago
parent
commit
6fe0e36fe0
  1. 7
      org.springframework.web/src/main/java/org/springframework/web/multipart/MultipartRequest.java
  2. 6
      org.springframework.web/src/main/java/org/springframework/web/multipart/commons/CommonsFileUploadSupport.java

7
org.springframework.web/src/main/java/org/springframework/web/multipart/MultipartRequest.java

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
/*
* Copyright 2002-2008 the original author or authors.
* Copyright 2002-2009 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -17,8 +17,8 @@ @@ -17,8 +17,8 @@
package org.springframework.web.multipart;
import java.util.Iterator;
import java.util.Map;
import java.util.List;
import java.util.Map;
import org.springframework.util.MultiValueMap;
@ -56,6 +56,7 @@ public interface MultipartRequest { @@ -56,6 +56,7 @@ public interface MultipartRequest {
* or an empty list if it does not exist.
* @param name a String specifying the parameter name of the multipart file
* @return the uploaded content in the form of a {@link MultipartFile} list
* @since 3.0
*/
List<MultipartFile> getFiles(String name);
@ -72,8 +73,8 @@ public interface MultipartRequest { @@ -72,8 +73,8 @@ public interface MultipartRequest {
* @return a map containing the parameter names as keys, and a list of
* {@link MultipartFile} objects as values
* @see MultipartFile
* @since 3.0
*/
MultiValueMap<String, MultipartFile> getMultiFileMap();
}

6
org.springframework.web/src/main/java/org/springframework/web/multipart/commons/CommonsFileUploadSupport.java

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
/*
* Copyright 2002-2008 the original author or authors.
* Copyright 2002-2009 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -39,7 +39,7 @@ import org.springframework.web.util.WebUtils; @@ -39,7 +39,7 @@ import org.springframework.web.util.WebUtils;
/**
* Base class for multipart resolvers that use Jakarta Commons FileUpload
* 1.1 or higher.
* 1.2 or above.
*
* <p>Provides common configuration properties and parsing functionality
* for multipart requests, using a Map of Spring CommonsMultipartFile instances
@ -220,7 +220,7 @@ public abstract class CommonsFileUploadSupport { @@ -220,7 +220,7 @@ public abstract class CommonsFileUploadSupport {
// Extract multipart files and multipart parameters.
for (FileItem fileItem : fileItems) {
if (fileItem.isFormField()) {
String value = null;
String value;
if (encoding != null) {
try {
value = fileItem.getString(encoding);

Loading…
Cancel
Save