kusalk commented on code in PR #760:
URL: https://github.com/apache/struts/pull/760#discussion_r1348243095


##########
core/src/main/java/org/apache/struts2/dispatcher/multipart/JakartaMultiPartRequest.java:
##########
@@ -142,26 +142,22 @@ protected void processNormalFormField(FileItem item, 
String charset) throws Unsu
             }
 
             long size = item.getSize();
-            if (size == 0) {
-                values.add(StringUtils.EMPTY);
-            } else if (size > maxStringLength) {
+            if (size > maxStringLength) {
+                LOG.debug("Form field {} of size {} bytes exceeds limit of 
{}.", item.getFieldName(), size, maxStringLength);

Review Comment:
   Not sure a field name can even contain newline characters but anyway 
SonarCloud is happy now



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to