This is an automated email from the ASF dual-hosted git repository.

reiern70 pushed a commit to branch wicket-9.x
in repository https://gitbox.apache.org/repos/asf/wicket.git


The following commit(s) were added to refs/heads/wicket-9.x by this push:
     new ff4ebd2f20 [WICKET-7033] add comments to code
ff4ebd2f20 is described below

commit ff4ebd2f20366a4c5137b661d669f86297363e4e
Author: reiern70 <[email protected]>
AuthorDate: Thu Apr 20 08:33:40 2023 +0300

    [WICKET-7033] add comments to code
---
 .../markup/html/form/upload/resource/AbstractFileUploadResource.java   | 3 +++
 1 file changed, 3 insertions(+)

diff --git 
a/wicket-core/src/main/java/org/apache/wicket/markup/html/form/upload/resource/AbstractFileUploadResource.java
 
b/wicket-core/src/main/java/org/apache/wicket/markup/html/form/upload/resource/AbstractFileUploadResource.java
index 847945696b..f07b65c4da 100644
--- 
a/wicket-core/src/main/java/org/apache/wicket/markup/html/form/upload/resource/AbstractFileUploadResource.java
+++ 
b/wicket-core/src/main/java/org/apache/wicket/markup/html/form/upload/resource/AbstractFileUploadResource.java
@@ -143,6 +143,9 @@ public abstract class AbstractFileUploadResource extends 
AbstractResource
                catch (FileUploadException fux)
                {
                        resourceResponse.setContentType("application/json");
+                       // even when this exceptional situation we want the 
request to be successful
+                       // as we are just sending back to client some JSON with 
error messages
+                       // which will in turn be sent to wicket component (who 
will handle the errors)
                        
resourceResponse.setStatusCode(HttpServletResponse.SC_OK);
                        JSONObject json = new JSONObject();
                        json.put("error", true);

Reply via email to