|
From: Bavo De R. <ba...@us...> - 2010-08-07 11:07:06
|
Update of /cvsroot/pfc/pfc-rt/src/java/portal/rt/ui/upload In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv11634/src/java/portal/rt/ui/upload Modified Files: FileUpload.java MultipartStream.java FormParameter.java Log Message: Refactored to support generics. Added a default serialization id for all serializable classes. Index: FileUpload.java =================================================================== RCS file: /cvsroot/pfc/pfc-rt/src/java/portal/rt/ui/upload/FileUpload.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** FileUpload.java 15 Feb 2006 20:47:04 -0000 1.2 --- FileUpload.java 7 Aug 2010 11:06:58 -0000 1.3 *************** *** 36,52 **** /** ! * <p>High level API for processing file uploads.</p> ! * ! * <p>This class handles multiple files per single HTML widget, sent using ! * < code > multipart / mixed < / code > encoding type, as specified by ! * <a href="http://www.ietf.org/rfc/rfc1867.txt">RFC 1867</a>. Use {@link ! * #parseRequest(HttpServletRequest)} to acquire a list of {@link ! * org.apache.commons.fileupload.FileItem}s associated with a given HTML ! * widget.</p> ! * ! * <p> Files will be stored in temporary disk storage or in memory, ! * depending on request size, and will be available as {@link ! * org.apache.commons.fileupload.FileItem}s.</p> ! * * @author <a href="mailto:Raf...@e-...">Rafal Krzewski</a> * @author <a href="mailto:dl...@co...">Daniel Rall</a> --- 36,58 ---- /** ! * <p> ! * High level API for processing file uploads. ! * </p> ! * ! * <p> ! * This class handles multiple files per single HTML widget, sent using ! * < code > multipart / mixed < / code > encoding type, as specified by <a ! * href="http://www.ietf.org/rfc/rfc1867.txt">RFC 1867</a>. Use ! * {@link #parseRequest(HttpServletRequest)} to acquire a list of ! * {@link org.apache.commons.fileupload.FileItem}s associated with a given HTML ! * widget. ! * </p> ! * ! * <p> ! * Files will be stored in temporary disk storage or in memory, depending on ! * request size, and will be available as ! * {@link org.apache.commons.fileupload.FileItem}s. ! * </p> ! * * @author <a href="mailto:Raf...@e-...">Rafal Krzewski</a> * @author <a href="mailto:dl...@co...">Daniel Rall</a> *************** *** 55,63 **** * @author <a href="mailto:ma...@ap...">Martin Cooper</a> * @author Sean C. Sullivan ! * * @version $Id$ */ ! public class FileUpload ! { // ----------------------------------------------------- Class methods --- 61,68 ---- * @author <a href="mailto:ma...@ap...">Martin Cooper</a> * @author Sean C. Sullivan ! * * @version $Id$ */ ! public class FileUpload { // ----------------------------------------------------- Class methods *************** *** 70,88 **** * Utility method that determines whether the request contains multipart * content. ! * ! * @param req The servlet request to be evaluated. Must be non-null. ! * ! * @return <code>true</code> if the request is multipart; ! * <code>false</code> otherwise. */ ! public static final boolean isMultipartContent(HttpServletRequest req) ! { String contentType = req.getHeader(CONTENT_TYPE); ! if (contentType == null) ! { return false; } ! if (contentType.startsWith(MULTIPART)) ! { return true; } --- 75,91 ---- * Utility method that determines whether the request contains multipart * content. ! * ! * @param req ! * The servlet request to be evaluated. Must be non-null. ! * ! * @return <code>true</code> if the request is multipart; <code>false</code> ! * otherwise. */ ! public static final boolean isMultipartContent(HttpServletRequest req) { String contentType = req.getHeader(CONTENT_TYPE); ! if (contentType == null) { return false; } ! if (contentType.startsWith(MULTIPART)) { return true; } *************** *** 128,133 **** /** ! * The maximum length of a single header line that will be parsed ! * (1024 bytes). */ public static final int MAX_HEADER_SIZE = 1024; --- 131,136 ---- /** ! * The maximum length of a single header line that will be parsed (1024 ! * bytes). */ public static final int MAX_HEADER_SIZE = 1024; *************** *** 154,165 **** /** * Returns the maximum allowed upload size. ! * * @return The maximum allowed size, in bytes. ! * * @see #setSizeMax(int) ! * */ ! public int getSizeMax() ! { return _sizeMax; } --- 157,167 ---- /** * Returns the maximum allowed upload size. ! * * @return The maximum allowed size, in bytes. ! * * @see #setSizeMax(int) ! * */ ! public int getSizeMax() { return _sizeMax; } *************** *** 167,178 **** /** * Sets the maximum allowed upload size. If negative, there is no maximum. ! * ! * @param sizeMax The maximum allowed size, in bytes, or -1 for no maximum. ! * * @see #getSizeMax() ! * */ ! public void setSizeMax(int sizeMax) ! { this._sizeMax = sizeMax; } --- 169,180 ---- /** * Sets the maximum allowed upload size. If negative, there is no maximum. ! * ! * @param sizeMax ! * The maximum allowed size, in bytes, or -1 for no maximum. ! * * @see #getSizeMax() ! * */ ! public void setSizeMax(int sizeMax) { this._sizeMax = sizeMax; } *************** *** 181,193 **** * Returns the size threshold beyond which files are written directly to * disk. The default value is 1024 bytes. ! * * @return The size threshold, in bytes. ! * * @see #setSizeThreshold(int) ! * ! * */ ! public int getSizeThreshold() ! { return _sizeThreshold; } --- 183,194 ---- * Returns the size threshold beyond which files are written directly to * disk. The default value is 1024 bytes. ! * * @return The size threshold, in bytes. ! * * @see #setSizeThreshold(int) ! * ! * */ ! public int getSizeThreshold() { return _sizeThreshold; } *************** *** 195,234 **** /** * Sets the size threshold beyond which files are written directly to disk. ! * ! * @param sizeThreshold The size threshold, in bytes. ! * * @see #getSizeThreshold() ! * */ ! public void setSizeThreshold(int sizeThreshold) ! { this._sizeThreshold = sizeThreshold; } /** ! * Returns the location used to temporarily store files that are larger ! * than the configured size threshold. ! * * @return The path to the temporary file location. ! * * @see #setRepositoryPath(String) ! * */ ! public String getRepositoryPath() ! { return _repositoryPath; } /** ! * Sets the location used to temporarily store files that are larger ! * than the configured size threshold. ! * ! * @param repositoryPath The path to the temporary file location. ! * * @see #getRepositoryPath() ! * */ ! public void setRepositoryPath(String repositoryPath) ! { this._repositoryPath = repositoryPath; } --- 196,234 ---- /** * Sets the size threshold beyond which files are written directly to disk. ! * ! * @param sizeThreshold ! * The size threshold, in bytes. ! * * @see #getSizeThreshold() ! * */ ! public void setSizeThreshold(int sizeThreshold) { this._sizeThreshold = sizeThreshold; } /** ! * Returns the location used to temporarily store files that are larger than ! * the configured size threshold. ! * * @return The path to the temporary file location. ! * * @see #setRepositoryPath(String) ! * */ ! public String getRepositoryPath() { return _repositoryPath; } /** ! * Sets the location used to temporarily store files that are larger than ! * the configured size threshold. ! * ! * @param repositoryPath ! * The path to the temporary file location. ! * * @see #getRepositoryPath() ! * */ ! public void setRepositoryPath(String repositoryPath) { this._repositoryPath = repositoryPath; } *************** *** 238,255 **** /** * Processes an <a href="http://www.ietf.org/rfc/rfc1867.txt">RFC 1867</a> ! * compliant <code>multipart/form-data</code> stream. If files are stored ! * on disk, the path is given by <code>getRepositoryPath()</code>. ! * ! * @param req The servlet request to be parsed. ! * * @return A list of <code>FileItem</code> instances parsed from the * request, in the order that they were transmitted. ! * ! * @exception FileUploadException if there are problems reading/parsing ! * the request or storing files. */ ! public List parseRequest(HttpServletRequest request) ! throws PortalProcessException ! { return parseRequest(request, getSizeThreshold(), getSizeMax(), getRepositoryPath()); --- 238,256 ---- /** * Processes an <a href="http://www.ietf.org/rfc/rfc1867.txt">RFC 1867</a> ! * compliant <code>multipart/form-data</code> stream. If files are stored on ! * disk, the path is given by <code>getRepositoryPath()</code>. ! * ! * @param req ! * The servlet request to be parsed. ! * * @return A list of <code>FileItem</code> instances parsed from the * request, in the order that they were transmitted. ! * ! * @exception FileUploadException ! * if there are problems reading/parsing the request or ! * storing files. */ ! public List<FileItem> parseRequest(HttpServletRequest request) ! throws PortalProcessException { return parseRequest(request, getSizeThreshold(), getSizeMax(), getRepositoryPath()); *************** *** 258,282 **** /** * Processes an <a href="http://www.ietf.org/rfc/rfc1867.txt">RFC 1867</a> ! * compliant <code>multipart/form-data</code> stream. If files are stored ! * on disk, the path is given by <code>getRepositoryPath()</code>. ! * ! * @param req The servlet request to be parsed. Must be non-null. ! * @param sizeThreshold The max size in bytes to be stored in memory. ! * @param sizeMax The maximum allowed upload size, in bytes. ! * @param path The location where the files should be stored. ! * * @return A list of <code>FileItem</code> instances parsed from the * request, in the order that they were transmitted. ! * ! * @exception FileUploadException if there are problems reading/parsing ! * the request or storing files. */ ! public List parseRequest(HttpServletRequest request, ! int pSizeThreshold, ! int pSizeMax, ! String pPath) throws PortalProcessException ! { ! if (null == request) ! { throw new NullPointerException("req parameter"); } --- 259,285 ---- /** * Processes an <a href="http://www.ietf.org/rfc/rfc1867.txt">RFC 1867</a> ! * compliant <code>multipart/form-data</code> stream. If files are stored on ! * disk, the path is given by <code>getRepositoryPath()</code>. ! * ! * @param req ! * The servlet request to be parsed. Must be non-null. ! * @param sizeThreshold ! * The max size in bytes to be stored in memory. ! * @param sizeMax ! * The maximum allowed upload size, in bytes. ! * @param path ! * The location where the files should be stored. ! * * @return A list of <code>FileItem</code> instances parsed from the * request, in the order that they were transmitted. ! * ! * @exception FileUploadException ! * if there are problems reading/parsing the request or ! * storing files. */ ! public List<FileItem> parseRequest(HttpServletRequest request, ! int pSizeThreshold, int pSizeMax, String pPath) ! throws PortalProcessException { ! if (null == request) { throw new NullPointerException("req parameter"); } *************** *** 284,289 **** String contentType = request.getHeader(CONTENT_TYPE); ! if ((null == contentType) || (!contentType.startsWith(MULTIPART))) ! { throw new PortalProcessException("the request doesn't contain a " + MULTIPART_FORM_DATA + " or " + MULTIPART_MIXED --- 287,291 ---- String contentType = request.getHeader(CONTENT_TYPE); ! if ((null == contentType) || (!contentType.startsWith(MULTIPART))) { throw new PortalProcessException("the request doesn't contain a " + MULTIPART_FORM_DATA + " or " + MULTIPART_MIXED *************** *** 292,297 **** int requestSize = request.getContentLength(); ! if (requestSize == -1) ! { throw new PortalProcessException( "the request was rejected because " --- 294,298 ---- int requestSize = request.getContentLength(); ! if (requestSize == -1) { throw new PortalProcessException( "the request was rejected because " *************** *** 299,304 **** } ! if (pSizeMax >= 0 && requestSize > pSizeMax) ! { throw new PortalProcessException( "the request was rejected because " --- 300,304 ---- } ! if (pSizeMax >= 0 && requestSize > pSizeMax) { throw new PortalProcessException( "the request was rejected because " *************** *** 310,323 **** } ! private ArrayList internalParseRequest(HttpServletRequest request, ! int pSizeThreshold, ! String pPath, ! String contentType, ! int requestSize) throws PortalProcessException ! { ! ArrayList items = new ArrayList(); ! try ! { byte[] boundary = contentType.substring( contentType.indexOf("boundary=") --- 310,319 ---- } ! private List<FileItem> internalParseRequest(HttpServletRequest request, ! int pSizeThreshold, String pPath, String contentType, ! int requestSize) throws PortalProcessException { ! List<FileItem> items = new ArrayList<FileItem>(); ! try { byte[] boundary = contentType.substring( contentType.indexOf("boundary=") *************** *** 328,341 **** MultipartStream multi = new MultipartStream(input, boundary); boolean nextPart = multi.skipPreamble(); ! while (nextPart) ! { ! Map headers = parseHeaders(multi.readHeaders()); String fieldName = getFieldName(headers); ! if (fieldName != null) ! { String subContentType = getHeader(headers, CONTENT_TYPE); if (subContentType != null ! && subContentType.startsWith(MULTIPART_MIXED)) ! { // Multiple files. byte[] subBoundary = subContentType.substring( --- 324,334 ---- MultipartStream multi = new MultipartStream(input, boundary); boolean nextPart = multi.skipPreamble(); ! while (nextPart) { ! Map<String, String> headers = parseHeaders(multi.readHeaders()); String fieldName = getFieldName(headers); ! if (fieldName != null) { String subContentType = getHeader(headers, CONTENT_TYPE); if (subContentType != null ! && subContentType.startsWith(MULTIPART_MIXED)) { // Multiple files. byte[] subBoundary = subContentType.substring( *************** *** 345,369 **** multi.setBoundary(subBoundary); boolean nextSubPart = multi.skipPreamble(); ! while (nextSubPart) ! { headers = parseHeaders(multi.readHeaders()); ! if (getFileName(headers) != null) ! { FileItem item = createItem(pSizeThreshold, pPath, headers, requestSize); OutputStream os = item.getOutputStream(); ! try ! { multi.readBodyData(os); ! } ! finally ! { os.close(); } item.setFieldName(getFieldName(headers)); items.add(item); ! } ! else ! { // Ignore anything but files inside // multipart/mixed. --- 338,355 ---- multi.setBoundary(subBoundary); boolean nextSubPart = multi.skipPreamble(); ! while (nextSubPart) { headers = parseHeaders(multi.readHeaders()); ! if (getFileName(headers) != null) { FileItem item = createItem(pSizeThreshold, pPath, headers, requestSize); OutputStream os = item.getOutputStream(); ! try { multi.readBodyData(os); ! } finally { os.close(); } item.setFieldName(getFieldName(headers)); items.add(item); ! } else { // Ignore anything but files inside // multipart/mixed. *************** *** 373,408 **** } multi.setBoundary(boundary); ! } ! else ! { ! if (getFileName(headers) != null) ! { // A single file. FileItem item = createItem(pSizeThreshold, pPath, headers, requestSize); OutputStream os = item.getOutputStream(); ! try ! { multi.readBodyData(os); ! } ! finally ! { os.close(); } item.setFieldName(getFieldName(headers)); items.add(item); ! } ! else ! { // A form field. FileItem item = createItem(pSizeThreshold, pPath, headers, requestSize); OutputStream os = item.getOutputStream(); ! try ! { multi.readBodyData(os); ! } ! finally ! { os.close(); } --- 359,383 ---- } multi.setBoundary(boundary); ! } else { ! if (getFileName(headers) != null) { // A single file. FileItem item = createItem(pSizeThreshold, pPath, headers, requestSize); OutputStream os = item.getOutputStream(); ! try { multi.readBodyData(os); ! } finally { os.close(); } item.setFieldName(getFieldName(headers)); items.add(item); ! } else { // A form field. FileItem item = createItem(pSizeThreshold, pPath, headers, requestSize); OutputStream os = item.getOutputStream(); ! try { multi.readBodyData(os); ! } finally { os.close(); } *************** *** 412,418 **** } } ! } ! else ! { // Skip this part. multi.discardBodyData(); --- 387,391 ---- } } ! } else { // Skip this part. multi.discardBodyData(); *************** *** 420,426 **** nextPart = multi.readBoundary(); } ! } ! catch (IOException e) ! { throw new PortalProcessException("Processing of " + MULTIPART_FORM_DATA + " request failed. ", e); --- 393,397 ---- nextPart = multi.readBoundary(); } ! } catch (IOException e) { throw new PortalProcessException("Processing of " + MULTIPART_FORM_DATA + " request failed. ", e); *************** *** 433,454 **** /** ! * Retrieves the file name from the <code>Content-disposition</code> ! * header. ! * ! * @param headers A <code>Map</code> containing the HTTP request headers. ! * * @return The file name for the current <code>encapsulation</code>. */ ! protected String getFileName(Map /* String, String */ ! headers) ! { String fileName = null; String cd = getHeader(headers, CONTENT_DISPOSITION); ! if (cd.startsWith(FORM_DATA) || cd.startsWith(ATTACHMENT)) ! { int start = cd.indexOf("filename=\""); int end = cd.indexOf('"', start + FILENAME_HEADER_PREFIX_SIZE); ! if (start != -1 && end != -1) ! { fileName = cd.substring(start + FILENAME_HEADER_PREFIX_SIZE, end).trim(); --- 404,421 ---- /** ! * Retrieves the file name from the <code>Content-disposition</code> header. ! * ! * @param headers ! * A <code>Map</code> containing the HTTP request headers. ! * * @return The file name for the current <code>encapsulation</code>. */ ! protected String getFileName(Map<String, String> headers) { String fileName = null; String cd = getHeader(headers, CONTENT_DISPOSITION); ! if (cd.startsWith(FORM_DATA) || cd.startsWith(ATTACHMENT)) { int start = cd.indexOf("filename=\""); int end = cd.indexOf('"', start + FILENAME_HEADER_PREFIX_SIZE); ! if (start != -1 && end != -1) { fileName = cd.substring(start + FILENAME_HEADER_PREFIX_SIZE, end).trim(); *************** *** 461,480 **** * Retrieves the field name from the <code>Content-disposition</code> * header. ! * ! * @param headers A <code>Map</code> containing the HTTP request headers. ! * * @return The field name for the current <code>encapsulation</code>. */ ! protected String getFieldName(Map /* String, String */ ! headers) ! { String fieldName = null; String cd = getHeader(headers, CONTENT_DISPOSITION); ! if (cd != null && cd.startsWith(FORM_DATA)) ! { int start = cd.indexOf("name=\""); int end = cd.indexOf('"', start + NAME_HEADER_PREFIX_SIZE); ! if (start != -1 && end != -1) ! { fieldName = cd.substring(start + NAME_HEADER_PREFIX_SIZE, end); } --- 428,444 ---- * Retrieves the field name from the <code>Content-disposition</code> * header. ! * ! * @param headers ! * A <code>Map</code> containing the HTTP request headers. ! * * @return The field name for the current <code>encapsulation</code>. */ ! protected String getFieldName(Map<String, String> headers) { String fieldName = null; String cd = getHeader(headers, CONTENT_DISPOSITION); ! if (cd != null && cd.startsWith(FORM_DATA)) { int start = cd.indexOf("name=\""); int end = cd.indexOf('"', start + NAME_HEADER_PREFIX_SIZE); ! if (start != -1 && end != -1) { fieldName = cd.substring(start + NAME_HEADER_PREFIX_SIZE, end); } *************** *** 485,522 **** /** * Creates a new {@link org.apache.commons.fileupload.FileItem} instance. ! * ! * @param sizeThreshold The max size in bytes to be stored in memory. ! * @param path The path for the FileItem. ! * @param headers A <code>Map</code> containing the HTTP request ! * headers. ! * @param requestSize The total size of the request, in bytes. ! * * @return A newly created <code>FileItem</code> instance. ! * ! * @exception FileUploadException if an error occurs. */ ! protected FileItem createItem(int pSizeThreshold, String path, Map /* String, String */ ! headers, int requestSize) throws PortalProcessException ! { ! return FileItem.newInstance(path, getFileName(headers), getHeader( ! headers, CONTENT_TYPE), requestSize, pSizeThreshold); } /** ! * <p> Parses the <code>header-part</code> and returns as key/value ! * pairs. ! * ! * <p> If there are multiple headers of the same names, the name ! * will map to a comma-separated list containing the values. ! * ! * @param headerPart The <code>header-part</code> of the current ! * <code>encapsulation</code>. ! * * @return A <code>Map</code> containing the parsed HTTP request headers. */ ! protected Map /* String, String */ ! parseHeaders(String headerPart) ! { ! Map headers = new HashMap(); char[] buffer = new char[MAX_HEADER_SIZE]; boolean done = false; --- 449,490 ---- /** * Creates a new {@link org.apache.commons.fileupload.FileItem} instance. ! * ! * @param sizeThreshold ! * The max size in bytes to be stored in memory. ! * @param path ! * The path for the FileItem. ! * @param headers ! * A <code>Map</code> containing the HTTP request headers. ! * @param requestSize ! * The total size of the request, in bytes. ! * * @return A newly created <code>FileItem</code> instance. ! * ! * @exception FileUploadException ! * if an error occurs. */ ! protected FileItem createItem(int pSizeThreshold, String path, ! Map<String, String> headers, int requestSize) ! throws PortalProcessException { ! return FileItem.newInstance(path, getFileName(headers), ! getHeader(headers, CONTENT_TYPE), requestSize, pSizeThreshold); } /** ! * <p> ! * Parses the <code>header-part</code> and returns as key/value pairs. ! * ! * <p> ! * If there are multiple headers of the same names, the name will map to a ! * comma-separated list containing the values. ! * ! * @param headerPart ! * The <code>header-part</code> of the current ! * <code>encapsulation</code>. ! * * @return A <code>Map</code> containing the parsed HTTP request headers. */ ! protected Map<String, String> parseHeaders(String headerPart) { ! Map<String, String> headers = new HashMap<String, String>(); char[] buffer = new char[MAX_HEADER_SIZE]; boolean done = false; *************** *** 524,571 **** int i; String header, headerName, headerValue; ! try ! { ! while (!done) ! { i = 0; // Copy a single line of characters into the buffer, // omitting trailing CRLF. ! while (i < 2 || buffer[i - 2] != '\r' || buffer[i - 1] != '\n') ! { buffer[i++] = headerPart.charAt(j++); } header = new String(buffer, 0, i - 2); ! if (header.equals("")) ! { done = true; ! } ! else ! { ! if (header.indexOf(':') == -1) ! { // This header line is malformed, skip it. continue; } headerName = header.substring(0, header.indexOf(':')) ! .trim() ! .toLowerCase(); headerValue = header.substring(header.indexOf(':') + 1) .trim(); ! if (getHeader(headers, headerName) != null) ! { // More that one heder of that name exists, // append to the list. headers.put(headerName, getHeader(headers, headerName) + ',' + headerValue); ! } ! else ! { headers.put(headerName, headerValue); } } } ! } ! catch (IndexOutOfBoundsException e) ! { // Headers were malformed. continue with all that was // parsed. --- 492,526 ---- int i; String header, headerName, headerValue; ! try { ! while (!done) { i = 0; // Copy a single line of characters into the buffer, // omitting trailing CRLF. ! while (i < 2 || buffer[i - 2] != '\r' || buffer[i - 1] != '\n') { buffer[i++] = headerPart.charAt(j++); } header = new String(buffer, 0, i - 2); ! if (header.equals("")) { done = true; ! } else { ! if (header.indexOf(':') == -1) { // This header line is malformed, skip it. continue; } headerName = header.substring(0, header.indexOf(':')) ! .trim().toLowerCase(); headerValue = header.substring(header.indexOf(':') + 1) .trim(); ! if (getHeader(headers, headerName) != null) { // More that one heder of that name exists, // append to the list. headers.put(headerName, getHeader(headers, headerName) + ',' + headerValue); ! } else { headers.put(headerName, headerValue); } } } ! } catch (IndexOutOfBoundsException e) { // Headers were malformed. continue with all that was // parsed. *************** *** 577,590 **** * Returns the header with the specified name from the supplied map. The * header lookup is case-insensitive. ! * ! * @param headers A <code>Map</code> containing the HTTP request headers. ! * @param name The name of the header to return. ! * ! * @return The value of specified header, or a comma-separated list if ! * there were multiple headers of that name. */ ! protected final String getHeader(Map /* String, String */ ! headers, String name) ! { return (String) headers.get(name.toLowerCase()); } --- 532,545 ---- * Returns the header with the specified name from the supplied map. The * header lookup is case-insensitive. ! * ! * @param headers ! * A <code>Map</code> containing the HTTP request headers. ! * @param name ! * The name of the header to return. ! * ! * @return The value of specified header, or a comma-separated list if there ! * were multiple headers of that name. */ ! protected final String getHeader(Map<String, String> headers, String name) { return (String) headers.get(name.toLowerCase()); } Index: FormParameter.java =================================================================== RCS file: /cvsroot/pfc/pfc-rt/src/java/portal/rt/ui/upload/FormParameter.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** FormParameter.java 13 Sep 2005 11:28:01 -0000 1.1 --- FormParameter.java 7 Aug 2010 11:06:58 -0000 1.2 *************** *** 25,28 **** --- 25,29 ---- import java.util.ArrayList; import java.util.Collection; + import java.util.List; import portal.rt.servlet.PortalProcessException; *************** *** 34,38 **** this._name = name; ! _values = new ArrayList(); } --- 35,39 ---- this._name = name; ! _values = new ArrayList<String>(); } *************** *** 54,58 **** } ! public Collection getValues() throws PortalProcessException { if (_values.size() < 1) --- 55,59 ---- } ! public Collection<String> getValues() throws PortalProcessException { if (_values.size() < 1) *************** *** 72,75 **** private String _name; ! private ArrayList _values; } \ No newline at end of file --- 73,76 ---- private String _name; ! private List<String> _values; } \ No newline at end of file Index: MultipartStream.java =================================================================== RCS file: /cvsroot/pfc/pfc-rt/src/java/portal/rt/ui/upload/MultipartStream.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** MultipartStream.java 13 Sep 2005 11:28:01 -0000 1.1 --- MultipartStream.java 7 Aug 2010 11:06:58 -0000 1.2 *************** *** 648,651 **** --- 648,653 ---- public class MalformedStreamException extends IOException { + private static final long serialVersionUID = 1L; + /** * Constructs a <code>MalformedStreamException</code> with no *************** *** 674,677 **** --- 676,681 ---- public class IllegalBoundaryException extends IOException { + private static final long serialVersionUID = 1L; + /** * Constructs an <code>IllegalBoundaryException</code> with no |