8
8
import java .io .*;
9
9
import java .math .BigDecimal ;
10
10
import java .math .BigInteger ;
11
- import java .nio .charset .Charset ;
12
11
13
12
import com .fasterxml .jackson .core .async .NonBlockingInputFeeder ;
14
13
import com .fasterxml .jackson .core .exc .InputCoercionException ;
19
18
import com .fasterxml .jackson .core .type .ResolvedType ;
20
19
import com .fasterxml .jackson .core .type .TypeReference ;
21
20
import com .fasterxml .jackson .core .util .JacksonFeatureSet ;
22
- import com .fasterxml .jackson .core .util .RequestPayload ;
23
21
24
22
/**
25
23
* Base class that defines public API for reading JSON content.
@@ -46,17 +44,6 @@ public enum NumberType {
46
44
protected final static JacksonFeatureSet <StreamReadCapability > DEFAULT_READ_CAPABILITIES
47
45
= JacksonFeatureSet .fromDefaults (StreamReadCapability .values ());
48
46
49
- /*
50
- /**********************************************************************
51
- /* Minimal configuration state
52
- /**********************************************************************
53
- */
54
-
55
- /**
56
- * Optional container that holds the request payload which will be displayed on JSON parsing error.
57
- */
58
- protected transient RequestPayload _requestPayload ;
59
-
60
47
/*
61
48
/**********************************************************************
62
49
/* Life-cycle
@@ -203,40 +190,6 @@ protected JsonParser() { }
203
190
*/
204
191
public abstract void assignCurrentValue (Object v );
205
192
206
- /*
207
- /**********************************************************************
208
- /* Attaching additional metadata: request payload
209
- /**********************************************************************
210
- */
211
-
212
- /**
213
- * Sets the payload to be passed if {@link StreamReadException} is thrown.
214
- *
215
- * @param payload to assign
216
- */
217
- public void setRequestPayloadOnError (RequestPayload payload ) {
218
- _requestPayload = payload ;
219
- }
220
-
221
- /**
222
- * Sets the {@code byte[]} request payload and the charset needed to decode it
223
- *
224
- * @param payload Payload to pass
225
- * @param charset Character encoding for (lazily) decoding payload
226
- */
227
- public void setRequestPayloadOnError (byte [] payload , Charset charset ) {
228
- _requestPayload = (payload == null ) ? null : new RequestPayload (payload , charset );
229
- }
230
-
231
- /**
232
- * Sets the String request payload
233
- *
234
- * @param payload to assign
235
- */
236
- public void setRequestPayloadOnError (String payload ) {
237
- _requestPayload = (payload == null ) ? null : new RequestPayload (payload );
238
- }
239
-
240
193
/*
241
194
/**********************************************************************
242
195
/* Optional support for non-blocking parsing
@@ -1661,8 +1614,7 @@ protected void _reportUnsupportedOperation() {
1661
1614
* @return {@link StreamReadException} constructed
1662
1615
*/
1663
1616
protected StreamReadException _constructReadException (String msg ) {
1664
- return new StreamReadException (this , msg )
1665
- .withRequestPayload (_requestPayload );
1617
+ return new StreamReadException (this , msg );
1666
1618
}
1667
1619
1668
1620
protected StreamReadException _constructReadException (String msg , Object arg ) {
@@ -1674,7 +1626,6 @@ protected StreamReadException _constructReadException(String msg, Object arg1, O
1674
1626
}
1675
1627
1676
1628
protected final StreamReadException _constructReadException (String msg , Throwable t ) {
1677
- return new StreamReadException (this , msg , t )
1678
- .withRequestPayload (_requestPayload );
1629
+ return new StreamReadException (this , msg , t );
1679
1630
}
1680
1631
}
0 commit comments