You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by tn...@apache.org on 2014/11/10 23:02:11 UTC

svn commit: r1637988 - in /commons/proper/fileupload/trunk/src: changes/changes.xml site/xdoc/streaming.xml

Author: tn
Date: Mon Nov 10 22:02:11 2014
New Revision: 1637988

URL: http://svn.apache.org/r1637988
Log:
[FILEUPLOAD-237] Fix streaming example.

Modified:
    commons/proper/fileupload/trunk/src/changes/changes.xml
    commons/proper/fileupload/trunk/src/site/xdoc/streaming.xml

Modified: commons/proper/fileupload/trunk/src/changes/changes.xml
URL: http://svn.apache.org/viewvc/commons/proper/fileupload/trunk/src/changes/changes.xml?rev=1637988&r1=1637987&r2=1637988&view=diff
==============================================================================
--- commons/proper/fileupload/trunk/src/changes/changes.xml (original)
+++ commons/proper/fileupload/trunk/src/changes/changes.xml Mon Nov 10 22:02:11 2014
@@ -44,6 +44,7 @@ The <action> type attribute can be add,u
 
   <body>
     <release version="1.4" date="TBA" description="TBA">
+      <action issue="FILEUPLOAD-237" dev="tn" type="fix">Fix streaming example: use FileItem.getInputStream() instead of openStream()</action>
       <action issue="FILEUPLOAD-248" dev="ecki" type="fix">DiskFileItem might suppress critical IOExceptions on rename - use FileUtil.move instead</action>
       <action issue="FILEUPLOAD-251" dev="sebb" type="fix">DiskFileItem#getTempFile() is broken</action>
       <action issue="FILEUPLOAD-250" dev="sebb" type="fix">FileUploadBase - potential resource leak - InputStream not closed on exception</action>

Modified: commons/proper/fileupload/trunk/src/site/xdoc/streaming.xml
URL: http://svn.apache.org/viewvc/commons/proper/fileupload/trunk/src/site/xdoc/streaming.xml?rev=1637988&r1=1637987&r2=1637988&view=diff
==============================================================================
--- commons/proper/fileupload/trunk/src/site/xdoc/streaming.xml (original)
+++ commons/proper/fileupload/trunk/src/site/xdoc/streaming.xml Mon Nov 10 22:02:11 2014
@@ -68,7 +68,7 @@ FileItemIterator iter = upload.getItemIt
 while (iter.hasNext()) {
     FileItemStream item = iter.next();
     String name = item.getFieldName();
-    InputStream stream = item.openStream();
+    InputStream stream = item.getInputStream();
     if (item.isFormField()) {
         System.out.println("Form field " + name + " with value "
             + Streams.asString(stream) + " detected.");