-
Notifications
You must be signed in to change notification settings - Fork 38.6k
Closed
Labels
in: webIssues in web modules (web, webmvc, webflux, websocket)Issues in web modules (web, webmvc, webflux, websocket)status: backportedAn issue that has been backported to maintenance branchesAn issue that has been backported to maintenance branchestype: enhancementA general enhancementA general enhancement
Milestone
Description
The 5.2.2 release includes new API to allow custom decoders to be registered to use the default configuration for decoders. There are a few things that could be improved about that.
- The method one has to work with is named
withDefaultConfig(…)
and takes aConsumer
. Wither methods usually return a new instance of the object being called on taking the argument into account. This one here simply provides a configuration abstraction I now have to use to configure my own decoder. DefaultCodecConfig
'smaxInMemorySize()
returns a nullableInteger
.setMaxInMemorySize(…)
takes anint
. Looks like everyone trying to use those methods will now have to repeat the samenull
check before copying the value over.- In general I wonder how the current programming model reacts to additional configuration exposed by
DefaultCodecConfig
. As it's user code that is responsible to copy properties from left to right, new options will not automatically propagated unless the developer finds out about that new property and adds the necessary line of copying.
Have you though about a CustomCodecs.decoderWithDefaultConfig(…)
that register the given Decoder
applying all applicable defaults? That especially would free developers from having to play catch up with new options added and also resolve the null
checks needed for every client.
Metadata
Metadata
Assignees
Labels
in: webIssues in web modules (web, webmvc, webflux, websocket)Issues in web modules (web, webmvc, webflux, websocket)status: backportedAn issue that has been backported to maintenance branchesAn issue that has been backported to maintenance branchestype: enhancementA general enhancementA general enhancement