@@ -134,6 +134,17 @@ public abstract class ParserMinimalBase extends JsonParser
134
134
@ Deprecated
135
135
protected final static int MAX_ERROR_TOKEN_LENGTH = 256 ;
136
136
137
+ /*
138
+ /**********************************************************
139
+ /* Minimal configuration
140
+ /**********************************************************
141
+ */
142
+
143
+ /**
144
+ * @since 2.18 (was higher up in {@code ParserBase} before)
145
+ */
146
+ protected final StreamReadConstraints _streamReadConstraints ;
147
+
137
148
/*
138
149
/**********************************************************
139
150
/* Minimal generally useful state
@@ -159,8 +170,21 @@ public abstract class ParserMinimalBase extends JsonParser
159
170
/**********************************************************
160
171
*/
161
172
162
- protected ParserMinimalBase () { super (); }
163
- protected ParserMinimalBase (int features ) { super (features ); }
173
+ @ Deprecated // since 2.18
174
+ protected ParserMinimalBase () {
175
+ super ();
176
+ _streamReadConstraints = StreamReadConstraints .defaults ();
177
+ }
178
+
179
+ @ Deprecated // since 2.18
180
+ protected ParserMinimalBase (int features ) {
181
+ this (features , null );
182
+ }
183
+
184
+ protected ParserMinimalBase (int features , StreamReadConstraints src ) {
185
+ super (features );
186
+ _streamReadConstraints = (src == null ) ? StreamReadConstraints .defaults () : src ;
187
+ }
164
188
165
189
// NOTE: had base impl in 2.3 and before; but shouldn't
166
190
// public abstract Version version();
@@ -178,6 +202,11 @@ public abstract class ParserMinimalBase extends JsonParser
178
202
//public void setFeature(Feature f, boolean state)
179
203
//public boolean isFeatureEnabled(Feature f)
180
204
205
+ @ Override // @since 2.18 (demoted from ParserBase)
206
+ public StreamReadConstraints streamReadConstraints () {
207
+ return _streamReadConstraints ;
208
+ }
209
+
181
210
/*
182
211
/**********************************************************
183
212
/* JsonParser impl
0 commit comments