reta commented on code in PR #3463:
URL: https://github.com/apache/cxf/pull/3463#discussion_r4000041806


##########
core/src/main/java/org/apache/cxf/staxutils/StaxUtils.java:
##########
@@ -147,10 +147,10 @@ public final class StaxUtils {
             getInteger(MAX_TEXT_LENGTH, 128 * 1024 * 1024);  //128M - more 
than this should DEFINITELY use MTOM
     private static final int MIN_TEXT_SEGMENT_VAL =
             getInteger(MIN_TEXT_SEGMENT, 64); // Same default as woodstox
-    private static final long MAX_ELEMENT_COUNT_VAL =
-            getLong(MAX_ELEMENT_COUNT, Long.MAX_VALUE);
+    // The MAX_XML_CHARACTERS should be aligned with MAX_TEXT_LENGTH (maximum 
contiguous length of any character

Review Comment:
   @coheigea it is difficult to come up with the right defaults here, but:
    - MAX_TEXT_LENGTH is set to 128Mb, so MAX_XML_CHARACTERS is set to at least 
2x of that
    - MAX_ELEMENT_COUNT should be larger than MAX_CHILD_ELEMENTS (it is 
included), so setting it to be at least 10x of MAX_CHILD_ELEMENTS 



-- 
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