Description
Bug description
I am reporting a bug in the JsonJobParametersConverter class in the spring batch framework.
According to the source code comments, the type parameter in the extended notation of job parameters is optional. However, the decode method in the JsonJobParametersConverter class throws a NullPointerException if the type parameter is not provided. This behavior goes against the documentation, as the default value of the type parameter should be String.
I would appreciate it if this issue could be addressed in a future release of spring batch.
Thank you for your attention to this matter.
Environment
- Spring Batch version : 5.0.0
- Java version : 17
Steps to reproduce
- Use the JsonJobParametersConverter in a Spring Batch application.
- Provide a value for the job parameter using the Extended notation without specifying a type.
- Run the application and observe the NullPointerException that is thrown in the decode method.
Expected behavior
According to the documentation, the type variable is optional and should default to String if it is not provided. The application should run without encountering any errors.
Minimal Complete Reproducible example
param1='{"value":"value1"}'