Skip to content

org.springframework.batch.core.JobParameter.toString may return null #834

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

Closed
spring-projects-issues opened this issue Nov 13, 2018 · 1 comment
Labels
for: backport-to-4.2.x Issues that will be back-ported to the 4.2.x line in: core type: bug
Milestone

Comments

@spring-projects-issues
Copy link
Collaborator

Dmitry Smeliansky opened BATCH-2772 and commented

public String toString() { public String toString() { return parameter == null ? null : (parameterType == ParameterType.DATE ? "" + ((Date) parameter).getTime() : parameter.toString()); }

This behavior causes NPE in the JopParameters.toProperties method

java.lang.NullPointerException at java.util.Hashtable.put(Hashtable.java:459) at org.springframework.batch.core.JobParameters.toProperties(JobParameters.java:219) 

Affects: 3.0.7

@fmbenhassine
Copy link
Contributor

Fixed in #3864 .

@fmbenhassine fmbenhassine removed the status: waiting-for-triage Issues that we did not analyse yet label May 18, 2021
@fmbenhassine fmbenhassine added this to the 4.3.3 milestone May 18, 2021
@fmbenhassine fmbenhassine added the for: backport-to-4.2.x Issues that will be back-ported to the 4.2.x line label May 18, 2021
@fmbenhassine fmbenhassine changed the title org.springframework.batch.core.JobParameter.toString may return null [BATCH-2772] org.springframework.batch.core.JobParameter.toString may return null May 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
for: backport-to-4.2.x Issues that will be back-ported to the 4.2.x line in: core type: bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants