Class CamundaJacksonJsonProvider
- All Implemented Interfaces:
jakarta.ws.rs.ext.MessageBodyReader<Object>,jakarta.ws.rs.ext.MessageBodyWriter<Object>,tools.jackson.core.Versioned
Background: for requests without an entity body, RESTEasy passes a null
InputStream to MessageBodyReader#readFrom. Jackson 3's
ProviderBase#_createParser forwards that stream straight to
ObjectReader.createParser(InputStream), which rejects a null argument with an
IllegalArgumentException ("argument \"src\" is null"). That surfaces to the client as
an HTTP 500 instead of the graceful null entity the Jackson 2 provider produced.
By returning null from _createParser when the stream is null, the
surrounding readFrom logic takes its empty-input branch. With
JakartaRSFeature.ALLOW_EMPTY_INPUT enabled by default, this yields a null
entity — exactly the Jackson 2 behaviour the engine-rest resources (e.g. redeploy, set job
retries) expect when no request body is provided.
-
Field Summary
Fields inherited from class tools.jackson.jakarta.rs.json.JacksonJsonProvider
_jsonpFunctionName, _providers, MIME_JAVASCRIPT, MIME_JAVASCRIPT_MSFields inherited from class tools.jackson.jakarta.rs.base.ProviderBase
_cfgCustomUntouchables, _defaultReadView, _defaultWriteView, _jakartaRSFeatures, _mapperConfig, _readers, _unreadableClasses, _untouchables, _unwritableClasses, _writers, DEFAULT_UNREADABLES, DEFAULT_UNTOUCHABLES, DEFAULT_UNWRITABLES, HEADER_CONTENT_TYPE_OPTIONS, JAKARTA_RS_FEATURE_DEFAULTS -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected tools.jackson.core.JsonParser_createParser(tools.jackson.databind.ObjectReader reader, InputStream rawStream) Methods inherited from class tools.jackson.jakarta.rs.json.JacksonJsonProvider
_configForReading, _configForWriting, _locateMapperViaProvider, hasMatchingMediaType, setJSONPFunctionName, versionMethods inherited from class tools.jackson.jakarta.rs.base.ProviderBase
_addSuperTypes, _configForReading, _configForWriting, _containedIn, _createGenerator, _createNoContentException, _endpointForReading, _endpointForWriting, _findCustomUntouchable, _isIgnorableForReading, _isIgnorableForWriting, _isSpecialReadable, _modifyHeaders, addUntouchable, configure, configure, configure, disable, disable, disable, disable, enable, enable, enable, enable, findEncoding, findSuperTypes, findSuperTypes, getSize, hasMatchingMediaTypeForReading, hasMatchingMediaTypeForWriting, isEnabled, isReadable, isWriteable, locateMapper, readFrom, removeUntouchable, setAnnotationsToUse, setDefaultReadView, setDefaultView, setDefaultWriteView, setMapper, writeTo
-
Constructor Details
-
CamundaJacksonJsonProvider
public CamundaJacksonJsonProvider()
-
-
Method Details
-
_createParser
protected tools.jackson.core.JsonParser _createParser(tools.jackson.databind.ObjectReader reader, InputStream rawStream) throws tools.jackson.core.JacksonException - Overrides:
_createParserin classtools.jackson.jakarta.rs.base.ProviderBase<tools.jackson.jakarta.rs.json.JacksonJsonProvider,tools.jackson.databind.json.JsonMapper, tools.jackson.jakarta.rs.json.JsonEndpointConfig, tools.jackson.jakarta.rs.json.JsonMapperConfigurator> - Throws:
tools.jackson.core.JacksonException
-