Author: markt
Date: Fri Mar 15 09:49:49 2013
New Revision: 1456844
URL: http://svn.apache.org/r1456844
Log:
Merge updates from Commons FileUpload to r1453029
Added:
tomcat/trunk/java/org/apache/tomcat/util/http/fileupload/disk/package-info.java
- copied, changed from r1453029,
commons/proper/fileupload/trunk/src/main/java/org/apache/commons/fileupload/disk/package-info.java
tomcat/trunk/java/org/apache/tomcat/util/http/fileupload/package-info.java
- copied, changed from r1453029,
commons/proper/fileupload/trunk/src/main/java/org/apache/commons/fileupload/package-info.java
tomcat/trunk/java/org/apache/tomcat/util/http/fileupload/servlet/package-info.java
- copied, changed from r1453029,
commons/proper/fileupload/trunk/src/main/java/org/apache/commons/fileupload/servlet/package-info.java
tomcat/trunk/java/org/apache/tomcat/util/http/fileupload/util/package-info.java
- copied, changed from r1453029,
commons/proper/fileupload/trunk/src/main/java/org/apache/commons/fileupload/util/package-info.java
Removed:
tomcat/trunk/java/org/apache/tomcat/util/http/fileupload/package.html
Modified:
tomcat/trunk/java/org/apache/tomcat/util/http/fileupload/ (props changed)
tomcat/trunk/java/org/apache/tomcat/util/http/fileupload/FileUploadBase.java
Propchange: tomcat/trunk/java/org/apache/tomcat/util/http/fileupload/
------------------------------------------------------------------------------
Reverse-merged
/commons/proper/fileupload/trunk/src/java/org/apache/commons/fileupload:r605690-1445523
Merged
/commons/proper/fileupload/trunk/src/main/java/org/apache/commons/fileupload:r605690-1453029
Modified:
tomcat/trunk/java/org/apache/tomcat/util/http/fileupload/FileUploadBase.java
URL:
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/http/fileupload/FileUploadBase.java?rev=1456844&r1=1456843&r2=1456844&view=diff
==============================================================================
---
tomcat/trunk/java/org/apache/tomcat/util/http/fileupload/FileUploadBase.java
(original)
+++
tomcat/trunk/java/org/apache/tomcat/util/http/fileupload/FileUploadBase.java
Fri Mar 15 09:49:49 2013
@@ -20,7 +20,6 @@ import java.io.IOException;
import java.io.InputStream;
import java.nio.charset.Charset;
import java.util.ArrayList;
-import java.util.Iterator;
import java.util.List;
import java.util.Locale;
import java.util.Map;
@@ -338,8 +337,7 @@ public abstract class FileUploadBase {
throw new FileUploadException(e.getMessage(), e);
} finally {
if (!successful) {
- for (Iterator<FileItem> iterator = items.iterator();
iterator.hasNext();) {
- FileItem fileItem = iterator.next();
+ for (FileItem fileItem : items) {
try {
fileItem.delete();
} catch (Exception e) {
@@ -367,7 +365,7 @@ public abstract class FileUploadBase {
parser.setLowerCaseNames(true);
// Parameter parser can handle null input
Map<String,String> params =
- parser.parse(contentType, new char[] {';', ','});
+ parser.parse(contentType, new char[] {';', ','});
String boundaryStr = params.get("boundary");
if (boundaryStr == null) {
Copied:
tomcat/trunk/java/org/apache/tomcat/util/http/fileupload/disk/package-info.java
(from r1453029,
commons/proper/fileupload/trunk/src/main/java/org/apache/commons/fileupload/disk/package-info.java)
URL:
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/http/fileupload/disk/package-info.java?p2=tomcat/trunk/java/org/apache/tomcat/util/http/fileupload/disk/package-info.java&p1=commons/proper/fileupload/trunk/src/main/java/org/apache/commons/fileupload/disk/package-info.java&r1=1453029&r2=1456844&rev=1456844&view=diff
==============================================================================
---
commons/proper/fileupload/trunk/src/main/java/org/apache/commons/fileupload/disk/package-info.java
(original)
+++
tomcat/trunk/java/org/apache/tomcat/util/http/fileupload/disk/package-info.java
Fri Mar 15 09:49:49 2013
@@ -1,3 +1,19 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
/**
* <p>
* A disk-based implementation of the
@@ -34,21 +50,4 @@
* for further details and examples of how to use this package.
* </p>
*/
-package org.apache.commons.fileupload.disk;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
+package org.apache.tomcat.util.http.fileupload.disk;
Copied:
tomcat/trunk/java/org/apache/tomcat/util/http/fileupload/package-info.java
(from r1453029,
commons/proper/fileupload/trunk/src/main/java/org/apache/commons/fileupload/package-info.java)
URL:
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/http/fileupload/package-info.java?p2=tomcat/trunk/java/org/apache/tomcat/util/http/fileupload/package-info.java&p1=commons/proper/fileupload/trunk/src/main/java/org/apache/commons/fileupload/package-info.java&r1=1453029&r2=1456844&rev=1456844&view=diff
==============================================================================
---
commons/proper/fileupload/trunk/src/main/java/org/apache/commons/fileupload/package-info.java
(original)
+++ tomcat/trunk/java/org/apache/tomcat/util/http/fileupload/package-info.java
Fri Mar 15 09:49:49 2013
@@ -1,4 +1,24 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
/**
+ * <p><b>NOTE:</b> This code has been copied from commons-fileupload trunk
+ * revision 1xxxxxx and commons-io 1.4 and package renamed to avoid clashes
with
+ * any web apps that may wish to use these libraries.
+ * </p>
* <p>
* A component for handling HTML file uploads as specified by
* <a href="http://www.ietf.org/rfc/rfc1867.txt"
target="_top">RFC 1867</a>.
@@ -9,14 +29,12 @@
* While this package provides the generic functionality for file uploads,
* these classes are not typically used directly. Instead, normal usage
* involves one of the provided extensions of
- * {@link org.apache.commons.fileupload.FileUpload FileUpload} such as
- * {@link org.apache.commons.fileupload.servlet.ServletFileUpload
ServletFileUpload}
- * or
- * {@link org.apache.commons.fileupload.portlet.PortletFileUpload
PortletFileUpload},
+ * {@link org.apache.tomcat.util.http.fileupload.FileUpload FileUpload} such as
+ * {@link org.apache.tomcat.util.http.fileupload.servlet.ServletFileUpload
ServletFileUpload}
* together with a factory for
- * {@link org.apache.commons.fileupload.FileItem FileItem} instances,
+ * {@link org.apache.tomcat.util.http.fileupload.FileItem FileItem} instances,
* such as
- * {@link org.apache.commons.fileupload.disk.DiskFileItemFactory
DiskFileItemFactory}.
+ * {@link org.apache.tomcat.util.http.fileupload.disk.DiskFileItemFactory
DiskFileItemFactory}.
* </p>
* <p>
* The following is a brief example of typical usage in a servlet, storing
@@ -65,21 +83,4 @@
* for further details and examples of how to use this package.
* </p>
*/
-package org.apache.commons.fileupload;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
+package org.apache.tomcat.util.http.fileupload;
\ No newline at end of file
Copied:
tomcat/trunk/java/org/apache/tomcat/util/http/fileupload/servlet/package-info.java
(from r1453029,
commons/proper/fileupload/trunk/src/main/java/org/apache/commons/fileupload/servlet/package-info.java)
URL:
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/http/fileupload/servlet/package-info.java?p2=tomcat/trunk/java/org/apache/tomcat/util/http/fileupload/servlet/package-info.java&p1=commons/proper/fileupload/trunk/src/main/java/org/apache/commons/fileupload/servlet/package-info.java&r1=1453029&r2=1456844&rev=1456844&view=diff
==============================================================================
---
commons/proper/fileupload/trunk/src/main/java/org/apache/commons/fileupload/servlet/package-info.java
(original)
+++
tomcat/trunk/java/org/apache/tomcat/util/http/fileupload/servlet/package-info.java
Fri Mar 15 09:49:49 2013
@@ -1,13 +1,29 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
/**
* <p>
* An implementation of
- * {@link org.apache.commons.fileupload.FileUpload FileUpload}
+ * {@link org.apache.tomcat.util.http.fileupload.FileUpload FileUpload}
* for use in servlets conforming to JSR 53. This implementation requires
* only access to the servlet's current <code>HttpServletRequest</code>
* instance, and a suitable
- * {@link org.apache.commons.fileupload.FileItemFactory FileItemFactory}
+ * {@link org.apache.tomcat.util.http.fileupload.FileItemFactory
FileItemFactory}
* implementation, such as
- * {@link org.apache.commons.fileupload.disk.DiskFileItemFactory
DiskFileItemFactory}.
+ * {@link org.apache.tomcat.util.http.fileupload.disk.DiskFileItemFactory
DiskFileItemFactory}.
* </p>
* <p>
* The following code fragment demonstrates typical usage.
@@ -25,21 +41,4 @@
* for further details and examples of how to use this package.
* </p>
*/
-package org.apache.commons.fileupload.servlet;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
+package org.apache.tomcat.util.http.fileupload.servlet;
Copied:
tomcat/trunk/java/org/apache/tomcat/util/http/fileupload/util/package-info.java
(from r1453029,
commons/proper/fileupload/trunk/src/main/java/org/apache/commons/fileupload/util/package-info.java)
URL:
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/http/fileupload/util/package-info.java?p2=tomcat/trunk/java/org/apache/tomcat/util/http/fileupload/util/package-info.java&p1=commons/proper/fileupload/trunk/src/main/java/org/apache/commons/fileupload/util/package-info.java&r1=1453029&r2=1456844&rev=1456844&view=diff
==============================================================================
---
commons/proper/fileupload/trunk/src/main/java/org/apache/commons/fileupload/util/package-info.java
(original)
+++
tomcat/trunk/java/org/apache/tomcat/util/http/fileupload/util/package-info.java
Fri Mar 15 09:49:49 2013
@@ -1,9 +1,3 @@
-/**
- * This package contains various IO related utility classes
- * or methods, which are basically reusable and not necessarily
- * restricted to the scope of a file upload.
- */
-package org.apache.commons.fileupload.util;
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
@@ -21,3 +15,9 @@ package org.apache.commons.fileupload.ut
* See the License for the specific language governing permissions and
* limitations under the License.
*/
+/**
+ * This package contains various IO related utility classes
+ * or methods, which are basically reusable and not necessarily
+ * restricted to the scope of a file upload.
+ */
+package org.apache.tomcat.util.http.fileupload.util;
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]