auth0-java icon indicating copy to clipboard operation
auth0-java copied to clipboard

Add findAndRegisterModules() to ObjectMapper

Open larsf96 opened this issue 3 years ago • 2 comments

Changes

After initialization of CustomRequest, I added the call this.mapper.findAndRegisterModules(); which will let the ObjectMapper register all the modules that are configured (i.e. JavaTimeModule for Java 8 Date classes) This fixes #440

References

#440

Testing

As this is only one line of code that has quite 0 logic, I didn't add tests. If required, a possible test could be to verify that the modules are getting loaded

  • [ ] This change adds test coverage
  • [x] This change has been tested on the latest version of the platform/language or why not

Checklist

larsf96 avatar Jun 30 '22 11:06 larsf96

@larsf96 I am wondering whether this could be a breaking change that registers all the modules that a project has having unexpected side effects.

Probably an API should be exposed to use registerModules instead.

poovamraj avatar Jul 05 '22 08:07 poovamraj

@poovamraj I added an API on Request level that can be executed to register modules for each call, would that be okay?

larsf96 avatar Jul 06 '22 12:07 larsf96