14
14
* <ul>
15
15
* <li>Maximum Number value length: default 1000 (see {@link #DEFAULT_MAX_NUM_LEN})
16
16
* </li>
17
- * <li>Maximum String value length: default 5_000_000 (see {@link #DEFAULT_MAX_STRING_LEN})
17
+ * <li>Maximum String value length: default 20_000_000 (see {@link #DEFAULT_MAX_STRING_LEN})
18
18
* </li>
19
19
* <li>Maximum Nesting depth: default 1000 (see {@link #DEFAULT_MAX_DEPTH})
20
20
* </li>
@@ -38,9 +38,12 @@ public class StreamReadConstraints
38
38
public static final int DEFAULT_MAX_NUM_LEN = 1000 ;
39
39
40
40
/**
41
- * Default setting for maximum string length: see {@link Builder#maxStringLength(int)} for details.
41
+ * Default setting for maximum string length: see {@link Builder#maxStringLength(int)}
42
+ * for details.
43
+ *<p>
44
+ * NOTE: Jackson 2.15.0 initially used a lower setting (5_000_000).
42
45
*/
43
- public static final int DEFAULT_MAX_STRING_LEN = 5_000_000 ;
46
+ public static final int DEFAULT_MAX_STRING_LEN = 20_000_000 ;
44
47
45
48
/**
46
49
* Limit for the maximum magnitude of Scale of {@link java.math.BigDecimal} that can be
@@ -98,13 +101,15 @@ public Builder maxNumberLength(final int maxNumLen) {
98
101
99
102
/**
100
103
* Sets the maximum string length (in chars or bytes, depending on input context).
101
- * The default is 5 ,000,000. This limit is not exact, the limit is applied when we increase
104
+ * The default is 20 ,000,000. This limit is not exact, the limit is applied when we increase
102
105
* internal buffer sizes and an exception will happen at sizes greater than this limit. Some
103
106
* text values that are a little bigger than the limit may be treated as valid but no text
104
107
* values with sizes less than or equal to this limit will be treated as invalid.
105
108
* <p>
106
109
* Setting this value to lower than the {@link #maxNumberLength(int)} is not recommended.
107
110
* </p>
111
+ *<p>
112
+ * NOTE: Jackson 2.15.0 initially used a lower setting (5_000_000).
108
113
*
109
114
* @param maxStringLen the maximum string length (in chars or bytes, depending on input context)
110
115
*
0 commit comments