Author: ivaynberg
Date: Mon Feb  9 17:12:10 2009
New Revision: 742631

URL: http://svn.apache.org/viewvc?rev=742631&view=rev
Log:
WICKET-1861

Modified:
    
wicket/trunk/wicket/src/main/java/org/apache/wicket/util/upload/FileUploadBase.java

Modified: 
wicket/trunk/wicket/src/main/java/org/apache/wicket/util/upload/FileUploadBase.java
URL: 
http://svn.apache.org/viewvc/wicket/trunk/wicket/src/main/java/org/apache/wicket/util/upload/FileUploadBase.java?rev=742631&r1=742630&r2=742631&view=diff
==============================================================================
--- 
wicket/trunk/wicket/src/main/java/org/apache/wicket/util/upload/FileUploadBase.java
 (original)
+++ 
wicket/trunk/wicket/src/main/java/org/apache/wicket/util/upload/FileUploadBase.java
 Mon Feb  9 17:12:10 2009
@@ -59,8 +59,8 @@
         * </p>
         * 
         * <p>
-        * <strong>NOTE:</strong>This method will be moved to the 
<code>ServletFileUpload</code>
-        * class after the FileUpload 1.1 release. Unfortunately, since this 
method is static, it is not
+        * <strong>NOTE:</strong>This method will be moved to the 
<code>ServletFileUpload</code> class
+        * after the FileUpload 1.1 release. Unfortunately, since this method 
is static, it is not
         * possible to provide its replacement until this method is removed.
         * </p>
         * 
@@ -232,8 +232,8 @@
         * @param ctx
         *            The context for the request to be parsed.
         * 
-        * @return A list of <code>FileItem</code> instances parsed from the 
request, in the order
-        *         that they were transmitted.
+        * @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.
@@ -256,7 +256,7 @@
                }
                int requestSize = ctx.getContentLength();
 
-               if (requestSize == -1)
+               if (requestSize == -1 && getSizeMax() != Long.MAX_VALUE)
                {
                        throw new UnknownSizeException("the request was 
rejected because its size is unknown");
                }
@@ -596,8 +596,7 @@
                }
 
                /**
-                * Constructs an <code>InvalidContentTypeException</code> with 
the specified detail
-                * message.
+                * Constructs an <code>InvalidContentTypeException</code> with 
the specified detail message.
                 * 
                 * @param message
                 *            The detail message.


Reply via email to