Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add java.util.concurrent.ConcurrentHashMap and java.sql.Date to the trusted classes list in Jackson2ExecutionContextStringSerializer #4407

Closed
fmarguet opened this issue Jun 30, 2023 · 3 comments
Labels
for: backport-to-5.0.x Issues that will be back-ported to the 5.0.x line in: core type: enhancement
Milestone

Comments

@fmarguet
Copy link

Hi @fmbenhassine, would it be possible to add java.util.concurrent.ConcurrentHashMap to the trusted classes list in Jackson2ExecutionContextStringSerializer ?
Thanks

@fmarguet fmarguet added status: waiting-for-triage Issues that we did not analyse yet type: bug labels Jun 30, 2023
@fmbenhassine
Copy link
Contributor

Yes, ConcurrentHashMap is in Jackson's trusted classes list, so I think we can safely add it to the Jackson serializer provided by Spring Batch. I will plan that for v5.1.

Please note that you can add the list of trusted classes in the constructor of Jackson2ExecutionContextStringSerializer.

@fmbenhassine fmbenhassine added this to the 5.1.0 milestone Jul 10, 2023
@fmarguet
Copy link
Author

Hi, thanks a lot for your answer and for the add in v5.1
We have the same message for java.sql.Date

We use spring/Jackson2 versions through Maven.
What would be the best way for adding classes list of trusted classes in the constructor of Jackson2ExecutionContextStringSerializer.
Does that mean we have to patch spring/Jackson2 modules ?

fmbenhassine added a commit that referenced this issue Aug 3, 2023
@fmbenhassine fmbenhassine added the for: backport-to-5.0.x Issues that will be back-ported to the 5.0.x line label Aug 3, 2023
@fmbenhassine fmbenhassine changed the title Add java.util.concurrent.ConcurrentHashMap to the trusted classes list in Jackson2ExecutionContextStringSerializer Add java.util.concurrent.ConcurrentHashMap and java.sql.Date to the trusted classes list in Jackson2ExecutionContextStringSerializer Aug 3, 2023
@fmbenhassine
Copy link
Contributor

What would be the best way for adding classes list of trusted classes in the constructor of Jackson2ExecutionContextStringSerializer.

You can add the list of additional types as parameters to the constructor of Jackson2ExecutionContextStringSerializer.

@fmbenhassine fmbenhassine modified the milestones: 5.1.0, 5.1.0-M2 Aug 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
for: backport-to-5.0.x Issues that will be back-ported to the 5.0.x line in: core type: enhancement
Projects
None yet
Development

No branches or pull requests

2 participants