You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by si...@apache.org on 2013/03/06 15:28:48 UTC
svn commit: r1453344 -
/commons/proper/fileupload/trunk/src/site/xdoc/using.xml
Author: simonetripodi
Date: Wed Mar 6 14:28:48 2013
New Revision: 1453344
URL: http://svn.apache.org/r1453344
Log:
trivial: updated documentation samples to use Java Generics
Modified:
commons/proper/fileupload/trunk/src/site/xdoc/using.xml
Modified: commons/proper/fileupload/trunk/src/site/xdoc/using.xml
URL: http://svn.apache.org/viewvc/commons/proper/fileupload/trunk/src/site/xdoc/using.xml?rev=1453344&r1=1453343&r2=1453344&view=diff
==============================================================================
--- commons/proper/fileupload/trunk/src/site/xdoc/using.xml (original)
+++ commons/proper/fileupload/trunk/src/site/xdoc/using.xml Wed Mar 6 14:28:48 2013
@@ -147,15 +147,14 @@ FileItemFactory factory = new DiskFileIt
// Configure a repository (to ensure a secure temp location is used)
ServletContext servletContext = this.getServletConfig().getServletContext();
-File repository = (File) servletContext.getAttribute(
- "javax.servlet.context.tempdir");
+File repository = (File) servletContext.getAttribute("javax.servlet.context.tempdir");
factory.setRepository(repository);
// Create a new file upload handler
ServletFileUpload upload = new ServletFileUpload(factory);
// Parse the request
-List /* FileItem */ items = upload.parseRequest(request);]]></source>
+List<FileItem> items = upload.parseRequest(request);]]></source>
<p>
That's all that's needed. Really!
</p>